<!DOCTYPE html>

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>module ActionView::Helpers::DateHelper - Rails Framework Documentation</title>

<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
</script>

<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>


<body id="top" class="module">
<nav id="metadata">
  <nav id="home-section" class="section">
  <h3 class="section-header">
    <a href="../../index.html">Home</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </h3>
</nav>


  <nav id="search-section" class="section project-section" class="initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <h3 class="section-header">
      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">
    </h3>
  </form>

  <ul id="search-results" class="initially-hidden"></ul>
</nav>


  <div id="file-metadata">
    <nav id="file-list-section" class="section">
  <h3 class="section-header">Defined In</h3>
  <ul>
    <li>/usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb
  </ul>
</nav>

    
  </div>

  <div id="class-metadata">
    
    
    
    <!-- Method Quickref -->
<nav id="method-list-section" class="section">
  <h3 class="section-header">Methods</h3>

  <ul class="link-list">
    
    <li><a href="#method-i-date_select">#date_select</a>
    
    <li><a href="#method-i-datetime_select">#datetime_select</a>
    
    <li><a href="#method-i-distance_of_time_in_words">#distance_of_time_in_words</a>
    
    <li><a href="#method-i-distance_of_time_in_words_to_now">#distance_of_time_in_words_to_now</a>
    
    <li><a href="#method-i-select_date">#select_date</a>
    
    <li><a href="#method-i-select_datetime">#select_datetime</a>
    
    <li><a href="#method-i-select_day">#select_day</a>
    
    <li><a href="#method-i-select_hour">#select_hour</a>
    
    <li><a href="#method-i-select_minute">#select_minute</a>
    
    <li><a href="#method-i-select_month">#select_month</a>
    
    <li><a href="#method-i-select_second">#select_second</a>
    
    <li><a href="#method-i-select_time">#select_time</a>
    
    <li><a href="#method-i-select_year">#select_year</a>
    
    <li><a href="#method-i-time_ago_in_words">#time_ago_in_words</a>
    
    <li><a href="#method-i-time_select">#time_select</a>
    
    <li><a href="#method-i-time_tag">#time_tag</a>
    
  </ul>
</nav>

  </div>

  <div id="project-metadata">
    <nav id="fileindex-section" class="section project-section">
  <h3 class="section-header">Pages</h3>

  <ul>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/actionmailer-3_2_7/MIT-LICENSE.html">MIT-LICENSE</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/actionmailer-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/actionpack-3_2_7/MIT-LICENSE.html">MIT-LICENSE</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/actionpack-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/activemodel-3_2_7/MIT-LICENSE.html">MIT-LICENSE</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/activemodel-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/activerecord-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/activeresource-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/activesupport-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../..//usr/local/lib/ruby/gems/1_9_1/gems/railties-3_2_7/README_rdoc.html">README</a>
  
    <li class="file"><a href="../../README_rdoc.html">README</a>
  
  </ul>
</nav>

    <nav id="classindex-section" class="section project-section">
  <h3 class="section-header">Class and Module Index</h3>

  <ul class="link-list">
  
    <li><a href="../../ActiveRecord.html">ActiveRecord</a>
  
    <li><a href="../../ActiveRecord/ActiveRecordError.html">ActiveRecord::ActiveRecordError</a>
  
    <li><a href="../../ActiveRecord/AdapterNotFound.html">ActiveRecord::AdapterNotFound</a>
  
    <li><a href="../../ActiveRecord/AdapterNotSpecified.html">ActiveRecord::AdapterNotSpecified</a>
  
    <li><a href="../../ActiveRecord/Aggregations.html">ActiveRecord::Aggregations</a>
  
    <li><a href="../../ActiveRecord/Aggregations/ClassMethods.html">ActiveRecord::Aggregations::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AssociationTypeMismatch.html">ActiveRecord::AssociationTypeMismatch</a>
  
    <li><a href="../../ActiveRecord/Associations.html">ActiveRecord::Associations</a>
  
    <li><a href="../../ActiveRecord/Associations/ClassMethods.html">ActiveRecord::Associations::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeAssignment.html">ActiveRecord::AttributeAssignment</a>
  
    <li><a href="../../ActiveRecord/AttributeAssignment/ClassMethods.html">ActiveRecord::AttributeAssignment::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeAssignmentError.html">ActiveRecord::AttributeAssignmentError</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods.html">ActiveRecord::AttributeMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/BeforeTypeCast.html">ActiveRecord::AttributeMethods::BeforeTypeCast</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/ClassMethods.html">ActiveRecord::AttributeMethods::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/DeprecatedUnderscoreRead.html">ActiveRecord::AttributeMethods::DeprecatedUnderscoreRead</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/DeprecatedUnderscoreRead/ClassMethods.html">ActiveRecord::AttributeMethods::DeprecatedUnderscoreRead::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Dirty.html">ActiveRecord::AttributeMethods::Dirty</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/PrimaryKey.html">ActiveRecord::AttributeMethods::PrimaryKey</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html">ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Query.html">ActiveRecord::AttributeMethods::Query</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Read.html">ActiveRecord::AttributeMethods::Read</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Read/ClassMethods.html">ActiveRecord::AttributeMethods::Read::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Serialization.html">ActiveRecord::AttributeMethods::Serialization</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Serialization/Attribute.html">ActiveRecord::AttributeMethods::Serialization::Attribute</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Serialization/ClassMethods.html">ActiveRecord::AttributeMethods::Serialization::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/TimeZoneConversion.html">ActiveRecord::AttributeMethods::TimeZoneConversion</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/TimeZoneConversion/ClassMethods.html">ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Write.html">ActiveRecord::AttributeMethods::Write</a>
  
    <li><a href="../../ActiveRecord/AttributeMethods/Write/ClassMethods.html">ActiveRecord::AttributeMethods::Write::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/AutosaveAssociation.html">ActiveRecord::AutosaveAssociation</a>
  
    <li><a href="../../ActiveRecord/AutosaveAssociation/ClassMethods.html">ActiveRecord::AutosaveAssociation::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Base.html">ActiveRecord::Base</a>
  
    <li><a href="../../ActiveRecord/Batches.html">ActiveRecord::Batches</a>
  
    <li><a href="../../ActiveRecord/Calculations.html">ActiveRecord::Calculations</a>
  
    <li><a href="../../ActiveRecord/Callbacks.html">ActiveRecord::Callbacks</a>
  
    <li><a href="../../ActiveRecord/ConfigurationError.html">ActiveRecord::ConfigurationError</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/AbstractAdapter.html">ActiveRecord::ConnectionAdapters::AbstractAdapter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html">ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/ConnectionHandler.html">ActiveRecord::ConnectionAdapters::ConnectionHandler</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/ConnectionManagement.html">ActiveRecord::ConnectionAdapters::ConnectionManagement</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/ConnectionPool.html">ActiveRecord::ConnectionAdapters::ConnectionPool</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/DatabaseLimits.html">ActiveRecord::ConnectionAdapters::DatabaseLimits</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/DatabaseStatements.html">ActiveRecord::ConnectionAdapters::DatabaseStatements</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/Mysql2Adapter.html">ActiveRecord::ConnectionAdapters::Mysql2Adapter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/MysqlAdapter.html">ActiveRecord::ConnectionAdapters::MysqlAdapter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/MysqlAdapter/StatementPool.html">ActiveRecord::ConnectionAdapters::MysqlAdapter::StatementPool</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/StatementPool.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/Utils.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::Utils</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/PostgreSQLColumn.html">ActiveRecord::ConnectionAdapters::PostgreSQLColumn</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/QueryCache.html">ActiveRecord::ConnectionAdapters::QueryCache</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/Quoting.html">ActiveRecord::ConnectionAdapters::Quoting</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/SQLiteAdapter.html">ActiveRecord::ConnectionAdapters::SQLiteAdapter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/SQLiteAdapter/ExplainPrettyPrinter.html">ActiveRecord::ConnectionAdapters::SQLiteAdapter::ExplainPrettyPrinter</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/SQLiteAdapter/StatementPool.html">ActiveRecord::ConnectionAdapters::SQLiteAdapter::StatementPool</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/SQLiteAdapter/Version.html">ActiveRecord::ConnectionAdapters::SQLiteAdapter::Version</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/SchemaCache.html">ActiveRecord::ConnectionAdapters::SchemaCache</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/SchemaStatements.html">ActiveRecord::ConnectionAdapters::SchemaStatements</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/StatementPool.html">ActiveRecord::ConnectionAdapters::StatementPool</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/Table.html">ActiveRecord::ConnectionAdapters::Table</a>
  
    <li><a href="../../ActiveRecord/ConnectionAdapters/TableDefinition.html">ActiveRecord::ConnectionAdapters::TableDefinition</a>
  
    <li><a href="../../ActiveRecord/ConnectionNotEstablished.html">ActiveRecord::ConnectionNotEstablished</a>
  
    <li><a href="../../ActiveRecord/ConnectionTimeoutError.html">ActiveRecord::ConnectionTimeoutError</a>
  
    <li><a href="../../ActiveRecord/CounterCache.html">ActiveRecord::CounterCache</a>
  
    <li><a href="../../ActiveRecord/DangerousAttributeError.html">ActiveRecord::DangerousAttributeError</a>
  
    <li><a href="../../ActiveRecord/Delegation.html">ActiveRecord::Delegation</a>
  
    <li><a href="../../ActiveRecord/DynamicFinderMatch.html">ActiveRecord::DynamicFinderMatch</a>
  
    <li><a href="../../ActiveRecord/DynamicMatchers.html">ActiveRecord::DynamicMatchers</a>
  
    <li><a href="../../ActiveRecord/DynamicScopeMatch.html">ActiveRecord::DynamicScopeMatch</a>
  
    <li><a href="../../ActiveRecord/Explain.html">ActiveRecord::Explain</a>
  
    <li><a href="../../ActiveRecord/FinderMethods.html">ActiveRecord::FinderMethods</a>
  
    <li><a href="../../ActiveRecord/Fixtures.html">ActiveRecord::Fixtures</a>
  
    <li><a href="../../ActiveRecord/Fixtures/File.html">ActiveRecord::Fixtures::File</a>
  
    <li><a href="../../ActiveRecord/IdentityMap.html">ActiveRecord::IdentityMap</a>
  
    <li><a href="../../ActiveRecord/IdentityMap/Middleware.html">ActiveRecord::IdentityMap::Middleware</a>
  
    <li><a href="../../ActiveRecord/Inheritance.html">ActiveRecord::Inheritance</a>
  
    <li><a href="../../ActiveRecord/Inheritance/ClassMethods.html">ActiveRecord::Inheritance::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Integration.html">ActiveRecord::Integration</a>
  
    <li><a href="../../ActiveRecord/InvalidForeignKey.html">ActiveRecord::InvalidForeignKey</a>
  
    <li><a href="../../ActiveRecord/IrreversibleMigration.html">ActiveRecord::IrreversibleMigration</a>
  
    <li><a href="../../ActiveRecord/Locking.html">ActiveRecord::Locking</a>
  
    <li><a href="../../ActiveRecord/Locking/Optimistic.html">ActiveRecord::Locking::Optimistic</a>
  
    <li><a href="../../ActiveRecord/Locking/Optimistic/ClassMethods.html">ActiveRecord::Locking::Optimistic::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Locking/Pessimistic.html">ActiveRecord::Locking::Pessimistic</a>
  
    <li><a href="../../ActiveRecord/LogSubscriber.html">ActiveRecord::LogSubscriber</a>
  
    <li><a href="../../ActiveRecord/Migration.html">ActiveRecord::Migration</a>
  
    <li><a href="../../ActiveRecord/Migration/CommandRecorder.html">ActiveRecord::Migration::CommandRecorder</a>
  
    <li><a href="../../ActiveRecord/MigrationProxy.html">ActiveRecord::MigrationProxy</a>
  
    <li><a href="../../ActiveRecord/ModelSchema.html">ActiveRecord::ModelSchema</a>
  
    <li><a href="../../ActiveRecord/ModelSchema/ClassMethods.html">ActiveRecord::ModelSchema::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/MultiparameterAssignmentErrors.html">ActiveRecord::MultiparameterAssignmentErrors</a>
  
    <li><a href="../../ActiveRecord/NestedAttributes.html">ActiveRecord::NestedAttributes</a>
  
    <li><a href="../../ActiveRecord/NestedAttributes/ClassMethods.html">ActiveRecord::NestedAttributes::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/NestedAttributes/TooManyRecords.html">ActiveRecord::NestedAttributes::TooManyRecords</a>
  
    <li><a href="../../ActiveRecord/Observer.html">ActiveRecord::Observer</a>
  
    <li><a href="../../ActiveRecord/Persistence.html">ActiveRecord::Persistence</a>
  
    <li><a href="../../ActiveRecord/Persistence/ClassMethods.html">ActiveRecord::Persistence::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/PreparedStatementInvalid.html">ActiveRecord::PreparedStatementInvalid</a>
  
    <li><a href="../../ActiveRecord/QueryCache.html">ActiveRecord::QueryCache</a>
  
    <li><a href="../../ActiveRecord/QueryCache/ClassMethods.html">ActiveRecord::QueryCache::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/QueryMethods.html">ActiveRecord::QueryMethods</a>
  
    <li><a href="../../ActiveRecord/Querying.html">ActiveRecord::Querying</a>
  
    <li><a href="../../ActiveRecord/Railtie.html">ActiveRecord::Railtie</a>
  
    <li><a href="../../ActiveRecord/Railties.html">ActiveRecord::Railties</a>
  
    <li><a href="../../ActiveRecord/Railties/ControllerRuntime.html">ActiveRecord::Railties::ControllerRuntime</a>
  
    <li><a href="../../ActiveRecord/Railties/ControllerRuntime/ClassMethods.html">ActiveRecord::Railties::ControllerRuntime::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/ReadOnlyRecord.html">ActiveRecord::ReadOnlyRecord</a>
  
    <li><a href="../../ActiveRecord/ReadonlyAttributes.html">ActiveRecord::ReadonlyAttributes</a>
  
    <li><a href="../../ActiveRecord/ReadonlyAttributes/ClassMethods.html">ActiveRecord::ReadonlyAttributes::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/RecordInvalid.html">ActiveRecord::RecordInvalid</a>
  
    <li><a href="../../ActiveRecord/RecordNotFound.html">ActiveRecord::RecordNotFound</a>
  
    <li><a href="../../ActiveRecord/RecordNotSaved.html">ActiveRecord::RecordNotSaved</a>
  
    <li><a href="../../ActiveRecord/RecordNotUnique.html">ActiveRecord::RecordNotUnique</a>
  
    <li><a href="../../ActiveRecord/Reflection.html">ActiveRecord::Reflection</a>
  
    <li><a href="../../ActiveRecord/Reflection/ClassMethods.html">ActiveRecord::Reflection::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Reflection/MacroReflection.html">ActiveRecord::Reflection::MacroReflection</a>
  
    <li><a href="../../ActiveRecord/Relation.html">ActiveRecord::Relation</a>
  
    <li><a href="../../ActiveRecord/Result.html">ActiveRecord::Result</a>
  
    <li><a href="../../ActiveRecord/Rollback.html">ActiveRecord::Rollback</a>
  
    <li><a href="../../ActiveRecord/Sanitization.html">ActiveRecord::Sanitization</a>
  
    <li><a href="../../ActiveRecord/Sanitization/ClassMethods.html">ActiveRecord::Sanitization::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Schema.html">ActiveRecord::Schema</a>
  
    <li><a href="../../ActiveRecord/Scoping.html">ActiveRecord::Scoping</a>
  
    <li><a href="../../ActiveRecord/Scoping/ClassMethods.html">ActiveRecord::Scoping::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Scoping/Default.html">ActiveRecord::Scoping::Default</a>
  
    <li><a href="../../ActiveRecord/Scoping/Default/ClassMethods.html">ActiveRecord::Scoping::Default::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Scoping/Named.html">ActiveRecord::Scoping::Named</a>
  
    <li><a href="../../ActiveRecord/Scoping/Named/ClassMethods.html">ActiveRecord::Scoping::Named::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Serialization.html">ActiveRecord::Serialization</a>
  
    <li><a href="../../ActiveRecord/SerializationTypeMismatch.html">ActiveRecord::SerializationTypeMismatch</a>
  
    <li><a href="../../ActiveRecord/SessionStore.html">ActiveRecord::SessionStore</a>
  
    <li><a href="../../ActiveRecord/SessionStore/Session.html">ActiveRecord::SessionStore::Session</a>
  
    <li><a href="../../ActiveRecord/SessionStore/SqlBypass.html">ActiveRecord::SessionStore::SqlBypass</a>
  
    <li><a href="../../ActiveRecord/SpawnMethods.html">ActiveRecord::SpawnMethods</a>
  
    <li><a href="../../ActiveRecord/StaleObjectError.html">ActiveRecord::StaleObjectError</a>
  
    <li><a href="../../ActiveRecord/StatementInvalid.html">ActiveRecord::StatementInvalid</a>
  
    <li><a href="../../ActiveRecord/Store.html">ActiveRecord::Store</a>
  
    <li><a href="../../ActiveRecord/Store/ClassMethods.html">ActiveRecord::Store::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/TestFixtures.html">ActiveRecord::TestFixtures</a>
  
    <li><a href="../../ActiveRecord/TestFixtures/ClassMethods.html">ActiveRecord::TestFixtures::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/ThrowResult.html">ActiveRecord::ThrowResult</a>
  
    <li><a href="../../ActiveRecord/Timestamp.html">ActiveRecord::Timestamp</a>
  
    <li><a href="../../ActiveRecord/Transactions.html">ActiveRecord::Transactions</a>
  
    <li><a href="../../ActiveRecord/Transactions/ClassMethods.html">ActiveRecord::Transactions::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Translation.html">ActiveRecord::Translation</a>
  
    <li><a href="../../ActiveRecord/UnknownAttributeError.html">ActiveRecord::UnknownAttributeError</a>
  
    <li><a href="../../ActiveRecord/UnknownPrimaryKey.html">ActiveRecord::UnknownPrimaryKey</a>
  
    <li><a href="../../ActiveRecord/Validations.html">ActiveRecord::Validations</a>
  
    <li><a href="../../ActiveRecord/Validations/AssociatedValidator.html">ActiveRecord::Validations::AssociatedValidator</a>
  
    <li><a href="../../ActiveRecord/Validations/ClassMethods.html">ActiveRecord::Validations::ClassMethods</a>
  
    <li><a href="../../ActiveRecord/Validations/UniquenessValidator.html">ActiveRecord::Validations::UniquenessValidator</a>
  
    <li><a href="../../ActiveRecord/WrappedDatabaseException.html">ActiveRecord::WrappedDatabaseException</a>
  
    <li><a href="../../ActiveSupport.html">ActiveSupport</a>
  
    <li><a href="../../ActiveSupport/Autoload.html">ActiveSupport::Autoload</a>
  
    <li><a href="../../ActiveSupport/BacktraceCleaner.html">ActiveSupport::BacktraceCleaner</a>
  
    <li><a href="../../ActiveSupport/Base64.html">ActiveSupport::Base64</a>
  
    <li><a href="../../ActiveSupport/BasicObject.html">ActiveSupport::BasicObject</a>
  
    <li><a href="../../ActiveSupport/Benchmarkable.html">ActiveSupport::Benchmarkable</a>
  
    <li><a href="../../ActiveSupport/BufferedLogger.html">ActiveSupport::BufferedLogger</a>
  
    <li><a href="../../ActiveSupport/BufferedLogger/Severity.html">ActiveSupport::BufferedLogger::Severity</a>
  
    <li><a href="../../ActiveSupport/Cache.html">ActiveSupport::Cache</a>
  
    <li><a href="../../ActiveSupport/Cache/Entry.html">ActiveSupport::Cache::Entry</a>
  
    <li><a href="../../ActiveSupport/Cache/FileStore.html">ActiveSupport::Cache::FileStore</a>
  
    <li><a href="../../ActiveSupport/Cache/MemCacheStore.html">ActiveSupport::Cache::MemCacheStore</a>
  
    <li><a href="../../ActiveSupport/Cache/MemoryStore.html">ActiveSupport::Cache::MemoryStore</a>
  
    <li><a href="../../ActiveSupport/Cache/NullStore.html">ActiveSupport::Cache::NullStore</a>
  
    <li><a href="../../ActiveSupport/Cache/Store.html">ActiveSupport::Cache::Store</a>
  
    <li><a href="../../ActiveSupport/Cache/Strategy.html">ActiveSupport::Cache::Strategy</a>
  
    <li><a href="../../ActiveSupport/Cache/Strategy/LocalCache.html">ActiveSupport::Cache::Strategy::LocalCache</a>
  
    <li><a href="../../ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html">ActiveSupport::Cache::Strategy::LocalCache::LocalStore</a>
  
    <li><a href="../../ActiveSupport/Callbacks.html">ActiveSupport::Callbacks</a>
  
    <li><a href="../../ActiveSupport/Callbacks/ClassMethods.html">ActiveSupport::Callbacks::ClassMethods</a>
  
    <li><a href="../../ActiveSupport/Concern.html">ActiveSupport::Concern</a>
  
    <li><a href="../../ActiveSupport/Configurable.html">ActiveSupport::Configurable</a>
  
    <li><a href="../../ActiveSupport/Configurable/ClassMethods.html">ActiveSupport::Configurable::ClassMethods</a>
  
    <li><a href="../../ActiveSupport/Configurable/Configuration.html">ActiveSupport::Configurable::Configuration</a>
  
    <li><a href="../../ActiveSupport/Dependencies.html">ActiveSupport::Dependencies</a>
  
    <li><a href="../../ActiveSupport/Dependencies/ClassCache.html">ActiveSupport::Dependencies::ClassCache</a>
  
    <li><a href="../../ActiveSupport/Dependencies/WatchStack.html">ActiveSupport::Dependencies::WatchStack</a>
  
    <li><a href="../../ActiveSupport/Deprecation.html">ActiveSupport::Deprecation</a>
  
    <li><a href="../../ActiveSupport/DescendantsTracker.html">ActiveSupport::DescendantsTracker</a>
  
    <li><a href="../../ActiveSupport/Duration.html">ActiveSupport::Duration</a>
  
    <li><a href="../../ActiveSupport/FileUpdateChecker.html">ActiveSupport::FileUpdateChecker</a>
  
    <li><a href="../../ActiveSupport/FileWatcher.html">ActiveSupport::FileWatcher</a>
  
    <li><a href="../../ActiveSupport/FileWatcher/Backend.html">ActiveSupport::FileWatcher::Backend</a>
  
    <li><a href="../../ActiveSupport/Gzip.html">ActiveSupport::Gzip</a>
  
    <li><a href="../../ActiveSupport/Gzip/Stream.html">ActiveSupport::Gzip::Stream</a>
  
    <li><a href="../../ActiveSupport/HashWithIndifferentAccess.html">ActiveSupport::HashWithIndifferentAccess</a>
  
    <li><a href="../../ActiveSupport/HashWithIndifferentAccess.html">ActiveSupport::HashWithIndifferentAccess</a>
  
    <li><a href="../../ActiveSupport/Inflector.html">ActiveSupport::Inflector</a>
  
    <li><a href="../../ActiveSupport/Inflector/Inflections.html">ActiveSupport::Inflector::Inflections</a>
  
    <li><a href="../../ActiveSupport/InheritableOptions.html">ActiveSupport::InheritableOptions</a>
  
    <li><a href="../../ActiveSupport/JSON.html">ActiveSupport::JSON</a>
  
    <li><a href="../../ActiveSupport/JSON/Encoding.html">ActiveSupport::JSON::Encoding</a>
  
    <li><a href="../../ActiveSupport/JSON/Encoding/CircularReferenceError.html">ActiveSupport::JSON::Encoding::CircularReferenceError</a>
  
    <li><a href="../../ActiveSupport/JSON/Encoding/Encoder.html">ActiveSupport::JSON::Encoding::Encoder</a>
  
    <li><a href="../../ActiveSupport/JSON/Variable.html">ActiveSupport::JSON::Variable</a>
  
    <li><a href="../../ActiveSupport/LogSubscriber.html">ActiveSupport::LogSubscriber</a>
  
    <li><a href="../../ActiveSupport/LogSubscriber/TestHelper.html">ActiveSupport::LogSubscriber::TestHelper</a>
  
    <li><a href="../../ActiveSupport/LogSubscriber/TestHelper/MockLogger.html">ActiveSupport::LogSubscriber::TestHelper::MockLogger</a>
  
    <li><a href="../../ActiveSupport/Memoizable.html">ActiveSupport::Memoizable</a>
  
    <li><a href="../../ActiveSupport/Memoizable/InstanceMethods.html">ActiveSupport::Memoizable::InstanceMethods</a>
  
    <li><a href="../../ActiveSupport/MessageEncryptor.html">ActiveSupport::MessageEncryptor</a>
  
    <li><a href="../../ActiveSupport/MessageEncryptor/InvalidMessage.html">ActiveSupport::MessageEncryptor::InvalidMessage</a>
  
    <li><a href="../../ActiveSupport/MessageVerifier.html">ActiveSupport::MessageVerifier</a>
  
    <li><a href="../../ActiveSupport/MessageVerifier/InvalidSignature.html">ActiveSupport::MessageVerifier::InvalidSignature</a>
  
    <li><a href="../../ActiveSupport/Multibyte.html">ActiveSupport::Multibyte</a>
  
    <li><a href="../../ActiveSupport/Multibyte/Chars.html">ActiveSupport::Multibyte::Chars</a>
  
    <li><a href="../../ActiveSupport/Multibyte/EncodingError.html">ActiveSupport::Multibyte::EncodingError</a>
  
    <li><a href="../../ActiveSupport/Multibyte/Unicode.html">ActiveSupport::Multibyte::Unicode</a>
  
    <li><a href="../../ActiveSupport/Multibyte/Unicode/Codepoint.html">ActiveSupport::Multibyte::Unicode::Codepoint</a>
  
    <li><a href="../../ActiveSupport/Multibyte/Unicode/UnicodeDatabase.html">ActiveSupport::Multibyte::Unicode::UnicodeDatabase</a>
  
    <li><a href="../../ActiveSupport/Notifications.html">ActiveSupport::Notifications</a>
  
    <li><a href="../../ActiveSupport/Notifications/Event.html">ActiveSupport::Notifications::Event</a>
  
    <li><a href="../../ActiveSupport/Notifications/Fanout.html">ActiveSupport::Notifications::Fanout</a>
  
    <li><a href="../../ActiveSupport/Notifications/Instrumenter.html">ActiveSupport::Notifications::Instrumenter</a>
  
    <li><a href="../../ActiveSupport/OrderedHash.html">ActiveSupport::OrderedHash</a>
  
    <li><a href="../../ActiveSupport/OrderedOptions.html">ActiveSupport::OrderedOptions</a>
  
    <li><a href="../../ActiveSupport/Railtie.html">ActiveSupport::Railtie</a>
  
    <li><a href="../../ActiveSupport/Rescuable.html">ActiveSupport::Rescuable</a>
  
    <li><a href="../../ActiveSupport/Rescuable/ClassMethods.html">ActiveSupport::Rescuable::ClassMethods</a>
  
    <li><a href="../../ActiveSupport/SafeBuffer.html">ActiveSupport::SafeBuffer</a>
  
    <li><a href="../../ActiveSupport/SafeBuffer/SafeConcatError.html">ActiveSupport::SafeBuffer::SafeConcatError</a>
  
    <li><a href="../../ActiveSupport/StringInquirer.html">ActiveSupport::StringInquirer</a>
  
    <li><a href="../../ActiveSupport/TaggedLogging.html">ActiveSupport::TaggedLogging</a>
  
    <li><a href="../../ActiveSupport/TestCase.html">ActiveSupport::TestCase</a>
  
    <li><a href="../../ActiveSupport/Testing.html">ActiveSupport::Testing</a>
  
    <li><a href="../../ActiveSupport/Testing/Assertions.html">ActiveSupport::Testing::Assertions</a>
  
    <li><a href="../../ActiveSupport/Testing/Declarative.html">ActiveSupport::Testing::Declarative</a>
  
    <li><a href="../../ActiveSupport/Testing/Isolation.html">ActiveSupport::Testing::Isolation</a>
  
    <li><a href="../../ActiveSupport/Testing/Isolation/Forking.html">ActiveSupport::Testing::Isolation::Forking</a>
  
    <li><a href="../../ActiveSupport/Testing/Isolation/MiniTest.html">ActiveSupport::Testing::Isolation::MiniTest</a>
  
    <li><a href="../../ActiveSupport/Testing/Isolation/Subprocess.html">ActiveSupport::Testing::Isolation::Subprocess</a>
  
    <li><a href="../../ActiveSupport/Testing/Isolation/TestUnit.html">ActiveSupport::Testing::Isolation::TestUnit</a>
  
    <li><a href="../../ActiveSupport/Testing/Pending.html">ActiveSupport::Testing::Pending</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance.html">ActiveSupport::Testing::Performance</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Benchmarker.html">ActiveSupport::Testing::Performance::Benchmarker</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/ForClassicTestUnit.html">ActiveSupport::Testing::Performance::ForClassicTestUnit</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/ForMiniTest.html">ActiveSupport::Testing::Performance::ForMiniTest</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics.html">ActiveSupport::Testing::Performance::Metrics</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/Amount.html">ActiveSupport::Testing::Performance::Metrics::Amount</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/Base.html">ActiveSupport::Testing::Performance::Metrics::Base</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/CpuTime.html">ActiveSupport::Testing::Performance::Metrics::CpuTime</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/DigitalInformationUnit.html">ActiveSupport::Testing::Performance::Metrics::DigitalInformationUnit</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/GcRuns.html">ActiveSupport::Testing::Performance::Metrics::GcRuns</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/GcTime.html">ActiveSupport::Testing::Performance::Metrics::GcTime</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/Memory.html">ActiveSupport::Testing::Performance::Metrics::Memory</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/Objects.html">ActiveSupport::Testing::Performance::Metrics::Objects</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/ProcessTime.html">ActiveSupport::Testing::Performance::Metrics::ProcessTime</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/Time.html">ActiveSupport::Testing::Performance::Metrics::Time</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/UserTime.html">ActiveSupport::Testing::Performance::Metrics::UserTime</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Metrics/WallTime.html">ActiveSupport::Testing::Performance::Metrics::WallTime</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Performer.html">ActiveSupport::Testing::Performance::Performer</a>
  
    <li><a href="../../ActiveSupport/Testing/Performance/Profiler.html">ActiveSupport::Testing::Performance::Profiler</a>
  
    <li><a href="../../ActiveSupport/Testing/ProxyTestResult.html">ActiveSupport::Testing::ProxyTestResult</a>
  
    <li><a href="../../ActiveSupport/Testing/RemoteError.html">ActiveSupport::Testing::RemoteError</a>
  
    <li><a href="../../ActiveSupport/Testing/SetupAndTeardown.html">ActiveSupport::Testing::SetupAndTeardown</a>
  
    <li><a href="../../ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html">ActiveSupport::Testing::SetupAndTeardown::ClassMethods</a>
  
    <li><a href="../../ActiveSupport/Testing/SetupAndTeardown/ForClassicTestUnit.html">ActiveSupport::Testing::SetupAndTeardown::ForClassicTestUnit</a>
  
    <li><a href="../../ActiveSupport/Testing/SetupAndTeardown/ForMiniTest.html">ActiveSupport::Testing::SetupAndTeardown::ForMiniTest</a>
  
    <li><a href="../../ActiveSupport/TimeWithZone.html">ActiveSupport::TimeWithZone</a>
  
    <li><a href="../../ActiveSupport/TimeZone.html">ActiveSupport::TimeZone</a>
  
    <li><a href="../../ActiveSupport/XmlMini.html">ActiveSupport::XmlMini</a>
  
    <li><a href="../../ActiveSupport/XmlMini_LibXMLSAX.html">ActiveSupport::XmlMini_LibXMLSAX</a>
  
    <li><a href="../../ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html">ActiveSupport::XmlMini_LibXMLSAX::HashBuilder</a>
  
    <li><a href="../../ActiveSupport/XmlMini_NokogiriSAX.html">ActiveSupport::XmlMini_NokogiriSAX</a>
  
    <li><a href="../../ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html">ActiveSupport::XmlMini_NokogiriSAX::HashBuilder</a>
  
    <li><a href="../../ActionController.html">ActionController</a>
  
    <li><a href="../../ActionController/Base.html">ActionController::Base</a>
  
    <li><a href="../../ActionController/Caching.html">ActionController::Caching</a>
  
    <li><a href="../../ActionController/Caching/Actions.html">ActionController::Caching::Actions</a>
  
    <li><a href="../../ActionController/Caching/Actions/ActionCachePath.html">ActionController::Caching::Actions::ActionCachePath</a>
  
    <li><a href="../../ActionController/Caching/Actions/ClassMethods.html">ActionController::Caching::Actions::ClassMethods</a>
  
    <li><a href="../../ActionController/Caching/ConfigMethods.html">ActionController::Caching::ConfigMethods</a>
  
    <li><a href="../../ActionController/Caching/Fragments.html">ActionController::Caching::Fragments</a>
  
    <li><a href="../../ActionController/Caching/Pages.html">ActionController::Caching::Pages</a>
  
    <li><a href="../../ActionController/Caching/Pages/ClassMethods.html">ActionController::Caching::Pages::ClassMethods</a>
  
    <li><a href="../../ActionController/Caching/Sweeping.html">ActionController::Caching::Sweeping</a>
  
    <li><a href="../../ActionController/Compatibility.html">ActionController::Compatibility</a>
  
    <li><a href="../../ActionController/ConditionalGet.html">ActionController::ConditionalGet</a>
  
    <li><a href="../../ActionController/Cookies.html">ActionController::Cookies</a>
  
    <li><a href="../../ActionController/DataStreaming.html">ActionController::DataStreaming</a>
  
    <li><a href="../../ActionController/Flash.html">ActionController::Flash</a>
  
    <li><a href="../../ActionController/ForceSSL.html">ActionController::ForceSSL</a>
  
    <li><a href="../../ActionController/ForceSSL/ClassMethods.html">ActionController::ForceSSL::ClassMethods</a>
  
    <li><a href="../../ActionController/Head.html">ActionController::Head</a>
  
    <li><a href="../../ActionController/Helpers.html">ActionController::Helpers</a>
  
    <li><a href="../../ActionController/Helpers/ClassMethods.html">ActionController::Helpers::ClassMethods</a>
  
    <li><a href="../../ActionController/HideActions.html">ActionController::HideActions</a>
  
    <li><a href="../../ActionController/HideActions/ClassMethods.html">ActionController::HideActions::ClassMethods</a>
  
    <li><a href="../../ActionController/HttpAuthentication.html">ActionController::HttpAuthentication</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Basic.html">ActionController::HttpAuthentication::Basic</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Basic/ControllerMethods.html">ActionController::HttpAuthentication::Basic::ControllerMethods</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html">ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Digest.html">ActionController::HttpAuthentication::Digest</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Digest/ControllerMethods.html">ActionController::HttpAuthentication::Digest::ControllerMethods</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Token.html">ActionController::HttpAuthentication::Token</a>
  
    <li><a href="../../ActionController/HttpAuthentication/Token/ControllerMethods.html">ActionController::HttpAuthentication::Token::ControllerMethods</a>
  
    <li><a href="../../ActionController/ImplicitRender.html">ActionController::ImplicitRender</a>
  
    <li><a href="../../ActionController/Instrumentation.html">ActionController::Instrumentation</a>
  
    <li><a href="../../ActionController/Instrumentation/ClassMethods.html">ActionController::Instrumentation::ClassMethods</a>
  
    <li><a href="../../ActionController/LogSubscriber.html">ActionController::LogSubscriber</a>
  
    <li><a href="../../ActionController/Metal.html">ActionController::Metal</a>
  
    <li><a href="../../ActionController/Middleware.html">ActionController::Middleware</a>
  
    <li><a href="../../ActionController/Middleware/ActionMiddleware.html">ActionController::Middleware::ActionMiddleware</a>
  
    <li><a href="../../ActionController/MimeResponds.html">ActionController::MimeResponds</a>
  
    <li><a href="../../ActionController/MimeResponds/ClassMethods.html">ActionController::MimeResponds::ClassMethods</a>
  
    <li><a href="../../ActionController/ParamsWrapper.html">ActionController::ParamsWrapper</a>
  
    <li><a href="../../ActionController/ParamsWrapper/ClassMethods.html">ActionController::ParamsWrapper::ClassMethods</a>
  
    <li><a href="../../ActionController/RackDelegation.html">ActionController::RackDelegation</a>
  
    <li><a href="../../ActionController/Railtie.html">ActionController::Railtie</a>
  
    <li><a href="../../ActionController/Railties.html">ActionController::Railties</a>
  
    <li><a href="../../ActionController/Railties/Paths.html">ActionController::Railties::Paths</a>
  
    <li><a href="../../ActionController/RecordIdentifier.html">ActionController::RecordIdentifier</a>
  
    <li><a href="../../ActionController/Redirecting.html">ActionController::Redirecting</a>
  
    <li><a href="../../ActionController/Renderers.html">ActionController::Renderers</a>
  
    <li><a href="../../ActionController/Renderers/All.html">ActionController::Renderers::All</a>
  
    <li><a href="../../ActionController/Renderers/ClassMethods.html">ActionController::Renderers::ClassMethods</a>
  
    <li><a href="../../ActionController/Rendering.html">ActionController::Rendering</a>
  
    <li><a href="../../ActionController/RequestForgeryProtection.html">ActionController::RequestForgeryProtection</a>
  
    <li><a href="../../ActionController/RequestForgeryProtection/ClassMethods.html">ActionController::RequestForgeryProtection::ClassMethods</a>
  
    <li><a href="../../ActionController/Rescue.html">ActionController::Rescue</a>
  
    <li><a href="../../ActionController/Responder.html">ActionController::Responder</a>
  
    <li><a href="../../ActionController/SessionManagement.html">ActionController::SessionManagement</a>
  
    <li><a href="../../ActionController/SessionManagement/ClassMethods.html">ActionController::SessionManagement::ClassMethods</a>
  
    <li><a href="../../ActionController/Streaming.html">ActionController::Streaming</a>
  
    <li><a href="../../ActionController/TemplateAssertions.html">ActionController::TemplateAssertions</a>
  
    <li><a href="../../ActionController/TestCase.html">ActionController::TestCase</a>
  
    <li><a href="../../ActionController/TestCase/Behavior.html">ActionController::TestCase::Behavior</a>
  
    <li><a href="../../ActionController/TestCase/Behavior/ClassMethods.html">ActionController::TestCase::Behavior::ClassMethods</a>
  
    <li><a href="../../ActionController/TestCase/RaiseActionExceptions.html">ActionController::TestCase::RaiseActionExceptions</a>
  
    <li><a href="../../ActionController/TestResponse.html">ActionController::TestResponse</a>
  
    <li><a href="../../ActionController/Testing.html">ActionController::Testing</a>
  
    <li><a href="../../ActionController/Testing/ClassMethods.html">ActionController::Testing::ClassMethods</a>
  
    <li><a href="../../ActionController/UrlFor.html">ActionController::UrlFor</a>
  
    <li><a href="../../ActionView.html">ActionView</a>
  
    <li><a href="../../ActionView/ActionView.html">ActionView::ActionView</a>
  
    <li><a href="../../ActionView/ActionView/ActionView.html">ActionView::ActionView::ActionView</a>
  
    <li><a href="../../ActionView/ActionView/ActionView/Base.html">ActionView::ActionView::ActionView::Base</a>
  
    <li><a href="../../ActionView/Base.html">ActionView::Base</a>
  
    <li><a href="../../ActionView/Context.html">ActionView::Context</a>
  
    <li><a href="../../ActionView/FileSystemResolver.html">ActionView::FileSystemResolver</a>
  
    <li><a href="../../ActionView/FixtureResolver.html">ActionView::FixtureResolver</a>
  
    <li><a href="../../ActionView/Helpers.html">ActionView::Helpers</a>
  
    <li><a href="../../ActionView/Helpers/ActiveModelHelper.html">ActionView::Helpers::ActiveModelHelper</a>
  
    <li><a href="../../ActionView/Helpers/ActiveModelInstanceTag.html">ActionView::Helpers::ActiveModelInstanceTag</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper.html">ActionView::Helpers::AssetTagHelper</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/AssetIncludeTag.html">ActionView::Helpers::AssetTagHelper::AssetIncludeTag</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/JavascriptIncludeTag.html">ActionView::Helpers::AssetTagHelper::JavascriptIncludeTag</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/JavascriptTagHelpers.html">ActionView::Helpers::AssetTagHelper::JavascriptTagHelpers</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/JavascriptTagHelpers/ClassMethods.html">ActionView::Helpers::AssetTagHelper::JavascriptTagHelpers::ClassMethods</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/StylesheetIncludeTag.html">ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/StylesheetTagHelpers.html">ActionView::Helpers::AssetTagHelper::StylesheetTagHelpers</a>
  
    <li><a href="../../ActionView/Helpers/AssetTagHelper/StylesheetTagHelpers/ClassMethods.html">ActionView::Helpers::AssetTagHelper::StylesheetTagHelpers::ClassMethods</a>
  
    <li><a href="../../ActionView/Helpers/AtomFeedHelper.html">ActionView::Helpers::AtomFeedHelper</a>
  
    <li><a href="../../ActionView/Helpers/AtomFeedHelper/AtomBuilder.html">ActionView::Helpers::AtomFeedHelper::AtomBuilder</a>
  
    <li><a href="../../ActionView/Helpers/AtomFeedHelper/AtomFeedBuilder.html">ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder</a>
  
    <li><a href="../../ActionView/Helpers/CacheHelper.html">ActionView::Helpers::CacheHelper</a>
  
    <li><a href="../../ActionView/Helpers/CaptureHelper.html">ActionView::Helpers::CaptureHelper</a>
  
    <li><a href="../../ActionView/Helpers/CsrfHelper.html">ActionView::Helpers::CsrfHelper</a>
  
    <li><a href="../../ActionView/Helpers/DateHelper.html">ActionView::Helpers::DateHelper</a>
  
    <li><a href="../../ActionView/Helpers/DateHelperInstanceTag.html">ActionView::Helpers::DateHelperInstanceTag</a>
  
    <li><a href="../../ActionView/Helpers/DebugHelper.html">ActionView::Helpers::DebugHelper</a>
  
    <li><a href="../../ActionView/Helpers/FormBuilder.html">ActionView::Helpers::FormBuilder</a>
  
    <li><a href="../../ActionView/Helpers/FormHelper.html">ActionView::Helpers::FormHelper</a>
  
    <li><a href="../../ActionView/Helpers/FormOptionsHelper.html">ActionView::Helpers::FormOptionsHelper</a>
  
    <li><a href="../../ActionView/Helpers/FormTagHelper.html">ActionView::Helpers::FormTagHelper</a>
  
    <li><a href="../../ActionView/Helpers/InstanceTag.html">ActionView::Helpers::InstanceTag</a>
  
    <li><a href="../../ActionView/Helpers/JavaScriptHelper.html">ActionView::Helpers::JavaScriptHelper</a>
  
    <li><a href="../../ActionView/Helpers/NumberHelper.html">ActionView::Helpers::NumberHelper</a>
  
    <li><a href="../../ActionView/Helpers/NumberHelper/InvalidNumberError.html">ActionView::Helpers::NumberHelper::InvalidNumberError</a>
  
    <li><a href="../../ActionView/Helpers/OutputSafetyHelper.html">ActionView::Helpers::OutputSafetyHelper</a>
  
    <li><a href="../../ActionView/Helpers/RecordTagHelper.html">ActionView::Helpers::RecordTagHelper</a>
  
    <li><a href="../../ActionView/Helpers/RenderingHelper.html">ActionView::Helpers::RenderingHelper</a>
  
    <li><a href="../../ActionView/Helpers/SanitizeHelper.html">ActionView::Helpers::SanitizeHelper</a>
  
    <li><a href="../../ActionView/Helpers/TagHelper.html">ActionView::Helpers::TagHelper</a>
  
    <li><a href="../../ActionView/Helpers/TextHelper.html">ActionView::Helpers::TextHelper</a>
  
    <li><a href="../../ActionView/Helpers/TranslationHelper.html">ActionView::Helpers::TranslationHelper</a>
  
    <li><a href="../../ActionView/Helpers/UrlHelper.html">ActionView::Helpers::UrlHelper</a>
  
    <li><a href="../../ActionView/LogSubscriber.html">ActionView::LogSubscriber</a>
  
    <li><a href="../../ActionView/LookupContext.html">ActionView::LookupContext</a>
  
    <li><a href="../../ActionView/LookupContext/DetailsCache.html">ActionView::LookupContext::DetailsCache</a>
  
    <li><a href="../../ActionView/LookupContext/ViewPaths.html">ActionView::LookupContext::ViewPaths</a>
  
    <li><a href="../../ActionView/NullResolver.html">ActionView::NullResolver</a>
  
    <li><a href="../../ActionView/PartialRenderer.html">ActionView::PartialRenderer</a>
  
    <li><a href="../../ActionView/Railtie.html">ActionView::Railtie</a>
  
    <li><a href="../../ActionView/Renderer.html">ActionView::Renderer</a>
  
    <li><a href="../../ActionView/Resolver.html">ActionView::Resolver</a>
  
    <li><a href="../../ActionView/Resolver/Path.html">ActionView::Resolver::Path</a>
  
    <li><a href="../../ActionView/Template.html">ActionView::Template</a>
  
    <li><a href="../../ActionView/Template/Handlers.html">ActionView::Template::Handlers</a>
  
    <li><a href="../../ActionView/Template/Handlers/Builder.html">ActionView::Template::Handlers::Builder</a>
  
    <li><a href="../../ActionView/Template/Handlers/ERB.html">ActionView::Template::Handlers::ERB</a>
  
    <li><a href="../../ActionView/Template/Handlers/Erubis.html">ActionView::Template::Handlers::Erubis</a>
  
    <li><a href="../../ActionView/TestCase.html">ActionView::TestCase</a>
  
    <li><a href="../../ActionView/TestCase/Behavior.html">ActionView::TestCase::Behavior</a>
  
    <li><a href="../../ActionView/TestCase/Behavior/ClassMethods.html">ActionView::TestCase::Behavior::ClassMethods</a>
  
    <li><a href="../../ActionView/TestCase/Behavior/Locals.html">ActionView::TestCase::Behavior::Locals</a>
  
    <li><a href="../../ActionView/TestCase/TestController.html">ActionView::TestCase::TestController</a>
  
    <li><a href="../../ActiveModel.html">ActiveModel</a>
  
    <li><a href="../../ActiveModel/AttributeMethods.html">ActiveModel::AttributeMethods</a>
  
    <li><a href="../../ActiveModel/AttributeMethods/ClassMethods.html">ActiveModel::AttributeMethods::ClassMethods</a>
  
    <li><a href="../../ActiveModel/AttributeMethods/ClassMethods/AttributeMethodMatcher.html">ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher</a>
  
    <li><a href="../../ActiveModel/BlockValidator.html">ActiveModel::BlockValidator</a>
  
    <li><a href="../../ActiveModel/Callbacks.html">ActiveModel::Callbacks</a>
  
    <li><a href="../../ActiveModel/Conversion.html">ActiveModel::Conversion</a>
  
    <li><a href="../../ActiveModel/Dirty.html">ActiveModel::Dirty</a>
  
    <li><a href="../../ActiveModel/EachValidator.html">ActiveModel::EachValidator</a>
  
    <li><a href="../../ActiveModel/Errors.html">ActiveModel::Errors</a>
  
    <li><a href="../../ActiveModel/Lint.html">ActiveModel::Lint</a>
  
    <li><a href="../../ActiveModel/Lint/Tests.html">ActiveModel::Lint::Tests</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity.html">ActiveModel::MassAssignmentSecurity</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/BlackList.html">ActiveModel::MassAssignmentSecurity::BlackList</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/ClassMethods.html">ActiveModel::MassAssignmentSecurity::ClassMethods</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/Error.html">ActiveModel::MassAssignmentSecurity::Error</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/LoggerSanitizer.html">ActiveModel::MassAssignmentSecurity::LoggerSanitizer</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/PermissionSet.html">ActiveModel::MassAssignmentSecurity::PermissionSet</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/Sanitizer.html">ActiveModel::MassAssignmentSecurity::Sanitizer</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/StrictSanitizer.html">ActiveModel::MassAssignmentSecurity::StrictSanitizer</a>
  
    <li><a href="../../ActiveModel/MassAssignmentSecurity/WhiteList.html">ActiveModel::MassAssignmentSecurity::WhiteList</a>
  
    <li><a href="../../ActiveModel/MissingAttributeError.html">ActiveModel::MissingAttributeError</a>
  
    <li><a href="../../ActiveModel/Name.html">ActiveModel::Name</a>
  
    <li><a href="../../ActiveModel/Naming.html">ActiveModel::Naming</a>
  
    <li><a href="../../ActiveModel/Observer.html">ActiveModel::Observer</a>
  
    <li><a href="../../ActiveModel/ObserverArray.html">ActiveModel::ObserverArray</a>
  
    <li><a href="../../ActiveModel/Observing.html">ActiveModel::Observing</a>
  
    <li><a href="../../ActiveModel/Observing/ClassMethods.html">ActiveModel::Observing::ClassMethods</a>
  
    <li><a href="../../ActiveModel/SecurePassword.html">ActiveModel::SecurePassword</a>
  
    <li><a href="../../ActiveModel/SecurePassword/ClassMethods.html">ActiveModel::SecurePassword::ClassMethods</a>
  
    <li><a href="../../ActiveModel/SecurePassword/InstanceMethodsOnActivation.html">ActiveModel::SecurePassword::InstanceMethodsOnActivation</a>
  
    <li><a href="../../ActiveModel/Serialization.html">ActiveModel::Serialization</a>
  
    <li><a href="../../ActiveModel/Serializers.html">ActiveModel::Serializers</a>
  
    <li><a href="../../ActiveModel/Serializers/JSON.html">ActiveModel::Serializers::JSON</a>
  
    <li><a href="../../ActiveModel/Serializers/Xml.html">ActiveModel::Serializers::Xml</a>
  
    <li><a href="../../ActiveModel/StrictValidationFailed.html">ActiveModel::StrictValidationFailed</a>
  
    <li><a href="../../ActiveModel/Translation.html">ActiveModel::Translation</a>
  
    <li><a href="../../ActiveModel/Validations.html">ActiveModel::Validations</a>
  
    <li><a href="../../ActiveModel/Validations/AcceptanceValidator.html">ActiveModel::Validations::AcceptanceValidator</a>
  
    <li><a href="../../ActiveModel/Validations/Callbacks.html">ActiveModel::Validations::Callbacks</a>
  
    <li><a href="../../ActiveModel/Validations/Callbacks/ClassMethods.html">ActiveModel::Validations::Callbacks::ClassMethods</a>
  
    <li><a href="../../ActiveModel/Validations/ClassMethods.html">ActiveModel::Validations::ClassMethods</a>
  
    <li><a href="../../ActiveModel/Validations/ConfirmationValidator.html">ActiveModel::Validations::ConfirmationValidator</a>
  
    <li><a href="../../ActiveModel/Validations/ExclusionValidator.html">ActiveModel::Validations::ExclusionValidator</a>
  
    <li><a href="../../ActiveModel/Validations/FormatValidator.html">ActiveModel::Validations::FormatValidator</a>
  
    <li><a href="../../ActiveModel/Validations/HelperMethods.html">ActiveModel::Validations::HelperMethods</a>
  
    <li><a href="../../ActiveModel/Validations/InclusionValidator.html">ActiveModel::Validations::InclusionValidator</a>
  
    <li><a href="../../ActiveModel/Validations/LengthValidator.html">ActiveModel::Validations::LengthValidator</a>
  
    <li><a href="../../ActiveModel/Validations/NumericalityValidator.html">ActiveModel::Validations::NumericalityValidator</a>
  
    <li><a href="../../ActiveModel/Validations/PresenceValidator.html">ActiveModel::Validations::PresenceValidator</a>
  
    <li><a href="../../ActiveModel/Validations/WithValidator.html">ActiveModel::Validations::WithValidator</a>
  
    <li><a href="../../ActiveModel/Validator.html">ActiveModel::Validator</a>
  
    <li><a href="../../ActiveResource.html">ActiveResource</a>
  
    <li><a href="../../ActiveResource/Base.html">ActiveResource::Base</a>
  
    <li><a href="../../ActiveResource/Connection.html">ActiveResource::Connection</a>
  
    <li><a href="../../ActiveResource/CustomMethods.html">ActiveResource::CustomMethods</a>
  
    <li><a href="../../ActiveResource/CustomMethods/ClassMethods.html">ActiveResource::CustomMethods::ClassMethods</a>
  
    <li><a href="../../ActiveResource/Errors.html">ActiveResource::Errors</a>
  
    <li><a href="../../ActiveResource/Formats.html">ActiveResource::Formats</a>
  
    <li><a href="../../ActiveResource/Formats/JsonFormat.html">ActiveResource::Formats::JsonFormat</a>
  
    <li><a href="../../ActiveResource/Formats/XmlFormat.html">ActiveResource::Formats::XmlFormat</a>
  
    <li><a href="../../ActiveResource/HttpMock.html">ActiveResource::HttpMock</a>
  
    <li><a href="../../ActiveResource/InvalidRequestError.html">ActiveResource::InvalidRequestError</a>
  
    <li><a href="../../ActiveResource/LogSubscriber.html">ActiveResource::LogSubscriber</a>
  
    <li><a href="../../ActiveResource/Observing.html">ActiveResource::Observing</a>
  
    <li><a href="../../ActiveResource/Railtie.html">ActiveResource::Railtie</a>
  
    <li><a href="../../ActiveResource/Request.html">ActiveResource::Request</a>
  
    <li><a href="../../ActiveResource/Response.html">ActiveResource::Response</a>
  
    <li><a href="../../ActiveResource/SSLError.html">ActiveResource::SSLError</a>
  
    <li><a href="../../ActiveResource/TimeoutError.html">ActiveResource::TimeoutError</a>
  
    <li><a href="../../ActiveResource/Validations.html">ActiveResource::Validations</a>
  
    <li><a href="../../HTML.html">HTML</a>
  
    <li><a href="../../HTML/FullSanitizer.html">HTML::FullSanitizer</a>
  
    <li><a href="../../HTML/LinkSanitizer.html">HTML::LinkSanitizer</a>
  
    <li><a href="../../HTML/Sanitizer.html">HTML::Sanitizer</a>
  
    <li><a href="../../HTML/Selector.html">HTML::Selector</a>
  
    <li><a href="../../HTML/Tag.html">HTML::Tag</a>
  
    <li><a href="../../HTML/WhiteListSanitizer.html">HTML::WhiteListSanitizer</a>
  
    <li><a href="../../Mysql.html">Mysql</a>
  
    <li><a href="../../Mysql/Result.html">Mysql::Result</a>
  
    <li><a href="../../Mysql/Stmt.html">Mysql::Stmt</a>
  
    <li><a href="../../Mysql/Time.html">Mysql::Time</a>
  
    <li><a href="../../Test.html">Test</a>
  
    <li><a href="../../Test/Unit.html">Test::Unit</a>
  
    <li><a href="../../Test/Unit/Collector.html">Test::Unit::Collector</a>
  
    <li><a href="../../Test/Unit/Collector/ObjectSpace.html">Test::Unit::Collector::ObjectSpace</a>
  
    <li><a href="../../I18n.html">I18n</a>
  
    <li><a href="../../I18n/ExceptionHandler.html">I18n::ExceptionHandler</a>
  
    <li><a href="../../I18n/Railtie.html">I18n::Railtie</a>
  
    <li><a href="../../Object.html">Object</a>
  
    <li><a href="../../ActiveSupport/HashWithIndifferentAccess.html">Object::HashWithIndifferentAccess</a>
  
    <li><a href="../../LoadError.html">Object::MissingSourceFile</a>
  
    <li><a href="../../ActionMailer.html">ActionMailer</a>
  
    <li><a href="../../ActionMailer/Base.html">ActionMailer::Base</a>
  
    <li><a href="../../ArJdbcMySQL.html">ArJdbcMySQL</a>
  
    <li><a href="../../ArJdbcMySQL/Error.html">ArJdbcMySQL::Error</a>
  
    <li><a href="../../ERB.html">ERB</a>
  
    <li><a href="../../ERB/Util.html">ERB::Util</a>
  
    <li><a href="../../LoadError.html">LoadError</a>
  
    <li><a href="../../LoadError.html">LoadError</a>
  
    <li><a href="../../Logger.html">Logger</a>
  
    <li><a href="../../Logger/SimpleFormatter.html">Logger::SimpleFormatter</a>
  
    <li><a href="../../Array.html">Array</a>
  
    <li><a href="../../Base64.html">Base64</a>
  
    <li><a href="../../Benchmark.html">Benchmark</a>
  
    <li><a href="../../BigDecimal.html">BigDecimal</a>
  
    <li><a href="../../Class.html">Class</a>
  
    <li><a href="../../Date.html">Date</a>
  
    <li><a href="../../DateTime.html">DateTime</a>
  
    <li><a href="../../Enumerable.html">Enumerable</a>
  
    <li><a href="../../FalseClass.html">FalseClass</a>
  
    <li><a href="../../File.html">File</a>
  
    <li><a href="../../Float.html">Float</a>
  
    <li><a href="../../Hash.html">Hash</a>
  
    <li><a href="../../Integer.html">Integer</a>
  
    <li><a href="../../Kernel.html">Kernel</a>
  
    <li><a href="../../Module.html">Module</a>
  
    <li><a href="../../NameError.html">NameError</a>
  
    <li><a href="../../NilClass.html">NilClass</a>
  
    <li><a href="../../Numeric.html">Numeric</a>
  
    <li><a href="../../Process.html">Process</a>
  
    <li><a href="../../QualifiedConstUtils.html">QualifiedConstUtils</a>
  
    <li><a href="../../Rails.html">Rails</a>
  
    <li><a href="../../Range.html">Range</a>
  
    <li><a href="../../Regexp.html">Regexp</a>
  
    <li><a href="../../String.html">String</a>
  
    <li><a href="../../Symbol.html">Symbol</a>
  
    <li><a href="../../Time.html">Time</a>
  
    <li><a href="../../TrueClass.html">TrueClass</a>
  
    <li><a href="../../URI.html">URI</a>
  
  </ul>
</nav>

  </div>
</nav>

<div id="documentation">
  <h1 class="module">module ActionView::Helpers::DateHelper</h1>

  <div id="description" class="description">
    
<h1 id="label-Action+View+Date+Helpers">Action View <a href="../../Date.html">Date</a> <a href="../Helpers.html">Helpers</a></h1>

<p>The <a href="../../Date.html">Date</a> Helper primarily creates
select/option tags for different kinds of dates and times or date and time
elements. All of the select-type methods share a number of common options
that are as follows:</p>
<ul><li>
<p><code>:prefix</code> - overwrites the default prefix of "date" used for the
select names. So specifying "birthday"</p>
</li></ul>

<p>would give <a href="http://month">birthday</a> instead of <a
href="http://month">date</a> if passed to the <code>select_month</code>
method.</p>
<ul><li>
<p><code>:include_blank</code> - set to true if it should be possible to set
an empty date.</p>
</li><li>
<p><code>:discard_type</code> - set to true if you want to discard the type
part of the select name. If set to true, the <code>select_month</code>
method would use simply "date" (which can be overwritten using
<code>:prefix</code>) instead of "<a href="http://month">date</a>".</p>
</li></ul>

  </div><!-- description -->

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    <!-- Methods -->
    
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-date_select" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">date_select</span><span
            class="method-args">(object_name, method, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a set of select tags (one for year, month, and day) pre-selected
for accessing a specified date-based attribute (identified by
<code>method</code>) on an object assigned to the template (identified by
<code>object</code>).</p>

<h4 id="method-i-date_select-label-Options">Options</h4>
<ul><li>
<p><code>:use_month_numbers</code> - Set to true if you want to use month
numbers rather than month names (e.g. "2" instead of "February").</p>
</li><li>
<p><code>:use_short_month</code>   - Set to true if you want to use
abbreviated month names instead of full month names (e.g. "Feb" instead of
"February").</p>
</li><li>
<p><code>:add_month_numbers</code>  - Set to true if you want to use both
month numbers and month names (e.g. "2 - February" instead of "February").</p>
</li><li>
<p><code>:use_month_names</code>   - Set to an array with 12 month names if
you want to customize month names. Note: You can also use Rails' i18n
functionality for this.</p>
</li><li>
<p><code>:date_separator</code>    - Specifies a string to separate the date
fields. Default is "" (i.e. nothing).</p>
</li><li>
<p><code>:start_year</code>        - Set the start year for the year select.
Default is <code>Time.now.year - 5</code>.</p>
</li><li>
<p><code>:end_year</code>          - Set the end year for the year select.
Default is <code>Time.now.year + 5</code>.</p>
</li><li>
<p><code>:discard_day</code>       - Set to true if you don't want to show a
day select. This includes the day as a hidden field instead of showing a
select field. Also note that this implicitly sets the day to be the first
of the given month in order to not create invalid dates like 31 February.</p>
</li><li>
<p><code>:discard_month</code>     - Set to true if you don't want to show a
month select. This includes the month as a hidden field instead of showing
a select field. Also note that this implicitly sets :discard_day to true.</p>
</li><li>
<p><code>:discard_year</code>      - Set to true if you don't want to show a
year select. This includes the year as a hidden field instead of showing a
select field.</p>
</li><li>
<p><code>:order</code>             - Set to an array containing
<code>:day</code>, <code>:month</code> and <code>:year</code> to customize
the order in which the select fields are shown. If you leave out any of the
symbols, the respective select will not be shown (like when you set
<code>:discard_xxx =&gt; true</code>. Defaults to the order defined in the
respective locale (e.g. [:year, :month, :day] in the en locale that ships
with <a href="../../Rails.html">Rails</a>).</p>
</li><li>
<p><code>:include_blank</code>     - Include a blank option in every select
field so it's possible to set empty dates.</p>
</li><li>
<p><code>:default</code>           - Set a default date if the affected date
isn't set or is nil.</p>
</li><li>
<p><code>:disabled</code>          - Set to true if you want show the select
fields as disabled.</p>
</li><li>
<p><code>:prompt</code>            - Set to true (for a generic prompt), a
prompt string or a hash of prompt strings for <code>:year</code>,
<code>:month</code>, <code>:day</code>, <code>:hour</code>,
<code>:minute</code> and <code>:second</code>. Setting this option prepends
a select option with a generic prompt  (Day, Month, Year, Hour, Minute,
Seconds) or the given prompt string.</p>
</li></ul>

<p>If anything is passed in the <code>html_options</code> hash it will be
applied to every select tag in the set.</p>

<p>NOTE: Discarded selects will default to 1. So if no month select is
available, January will be assumed.</p>

<h4 id="method-i-date_select-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-comment"># Generates a date select that when POSTed is stored in the article variable, in the written_on attribute.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>)

<span class="ruby-comment"># Generates a date select that when POSTed is stored in the article variable, in the written_on attribute,</span>
<span class="ruby-comment"># with the year in the year drop down box starting at 1995.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">start_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1995</span>)

<span class="ruby-comment"># Generates a date select that when POSTed is stored in the article variable, in the written_on attribute,</span>
<span class="ruby-comment"># with the year in the year drop down box starting at 1995, numbers used for months instead of words,</span>
<span class="ruby-comment"># and without a day select box.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">start_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1995</span>, :<span class="ruby-identifier">use_month_numbers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>,
                                  :<span class="ruby-identifier">discard_day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>, :<span class="ruby-identifier">include_blank</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a date select that when POSTed is stored in the article variable, in the written_on attribute</span>
<span class="ruby-comment"># with the fields ordered as day, month, year rather than month, day, year.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">order</span> =<span class="ruby-operator">&gt;</span> [:<span class="ruby-identifier">day</span>, :<span class="ruby-identifier">month</span>, :<span class="ruby-identifier">year</span>])

<span class="ruby-comment"># Generates a date select that when POSTed is stored in the user variable, in the birthday attribute</span>
<span class="ruby-comment"># lacking a year field.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;user&quot;</span>, <span class="ruby-string">&quot;birthday&quot;</span>, :<span class="ruby-identifier">order</span> =<span class="ruby-operator">&gt;</span> [:<span class="ruby-identifier">month</span>, :<span class="ruby-identifier">day</span>])

<span class="ruby-comment"># Generates a date select that when POSTed is stored in the article variable, in the written_on attribute</span>
<span class="ruby-comment"># which is initially set to the date 3 days from the current date</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">3</span>.<span class="ruby-identifier">days</span>.<span class="ruby-identifier">from_now</span>)

<span class="ruby-comment"># Generates a date select that when POSTed is stored in the credit_card variable, in the bill_due attribute</span>
<span class="ruby-comment"># that will have a default day of 20.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;credit_card&quot;</span>, <span class="ruby-string">&quot;bill_due&quot;</span>, :<span class="ruby-identifier">default</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">20</span> })

<span class="ruby-comment"># Generates a date select with custom prompts.</span>
<span class="ruby-identifier">date_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Select day'</span>, :<span class="ruby-identifier">month</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Select month'</span>, :<span class="ruby-identifier">year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Select year'</span> })
</pre>

<p>The selects are prepared for multi-parameter assignment to an Active Record
object.</p>

<p>Note: If the day is not included as an option but the month is, the day
will be set to the 1st to ensure that all month choices are valid.</p>
          

          
          <div class="method-source-code" id="date_select-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 215</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">date_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">InstanceTag</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-keyword">self</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:object</span>)).<span class="ruby-identifier">to_date_select_tag</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- date_select-source -->
          
        </div>

        

        
      </div><!-- date_select-method -->

    
      <div id="method-i-datetime_select" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">datetime_select</span><span
            class="method-args">(object_name, method, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a set of select tags (one for year, month, day, hour, and minute)
pre-selected for accessing a specified datetime-based attribute (identified
by <code>method</code>) on an object assigned to the template (identified
by <code>object</code>).</p>

<p>If anything is passed in the html_options hash it will be applied to every
select tag in the set.</p>

<h4 id="method-i-datetime_select-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-comment"># Generates a datetime select that, when POSTed, will be stored in the article variable in the written_on</span>
<span class="ruby-comment"># attribute.</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>)

<span class="ruby-comment"># Generates a datetime select with a year select that starts at 1995 that, when POSTed, will be stored in the</span>
<span class="ruby-comment"># article variable in the written_on attribute.</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">start_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1995</span>)

<span class="ruby-comment"># Generates a datetime select with a default value of 3 days from the current time that, when POSTed, will</span>
<span class="ruby-comment"># be stored in the trip variable in the departing attribute.</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;trip&quot;</span>, <span class="ruby-string">&quot;departing&quot;</span>, :<span class="ruby-identifier">default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">3</span>.<span class="ruby-identifier">days</span>.<span class="ruby-identifier">from_now</span>)

<span class="ruby-comment"># Generate a datetime select with hours in the AM/PM format</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">ampm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a datetime select that discards the type that, when POSTed, will be stored in the article variable</span>
<span class="ruby-comment"># as the written_on attribute.</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">discard_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a datetime select with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for generic prompts.</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose day'</span>, :<span class="ruby-identifier">month</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose month'</span>, :<span class="ruby-identifier">year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose year'</span>})
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">hour</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>}) <span class="ruby-comment"># generic prompt for hours</span>
<span class="ruby-identifier">datetime_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>) <span class="ruby-comment"># generic prompts for all</span>
</pre>

<p>The selects are prepared for multi-parameter assignment to an Active Record
object.</p>
          

          
          <div class="method-source-code" id="datetime_select-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 289</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">datetime_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">InstanceTag</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-keyword">self</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:object</span>)).<span class="ruby-identifier">to_datetime_select_tag</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- datetime_select-source -->
          
        </div>

        

        
      </div><!-- datetime_select-method -->

    
      <div id="method-i-distance_of_time_in_words" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">distance_of_time_in_words</span><span
            class="method-args">(from_time, to_time = 0, include_seconds = false, options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Reports the approximate distance in time between two <a
href="../../Time.html">Time</a>, <a href="../../Date.html">Date</a> or <a
href="../../DateTime.html">DateTime</a> objects or integers as seconds. Set
<code>include_seconds</code> to true if you want more detailed
approximations when distance &lt; 1 min, 29 secs. Distances are reported
based on the following table:</p>

<pre class="ruby"><span class="ruby-value">0</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>                                                             <span class="ruby-comment"># =&gt; less than a minute</span>
<span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-identifier">min</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>                                                <span class="ruby-comment"># =&gt; 1 minute</span>
<span class="ruby-value">1</span> <span class="ruby-identifier">min</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">44</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>                                       <span class="ruby-comment"># =&gt; [2..44] minutes</span>
<span class="ruby-value">44</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">89</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>                                     <span class="ruby-comment"># =&gt; about 1 hour</span>
<span class="ruby-value">89</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">23</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>                             <span class="ruby-comment"># =&gt; about [2..24] hours</span>
<span class="ruby-value">23</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">41</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>                     <span class="ruby-comment"># =&gt; 1 day</span>
<span class="ruby-value">41</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span>  <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">29</span> <span class="ruby-identifier">days</span>, <span class="ruby-value">23</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>           <span class="ruby-comment"># =&gt; [2..29] days</span>
<span class="ruby-value">29</span> <span class="ruby-identifier">days</span>, <span class="ruby-value">23</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">59</span> <span class="ruby-identifier">days</span>, <span class="ruby-value">23</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">29</span> <span class="ruby-identifier">secs</span>   <span class="ruby-comment"># =&gt; about 1 month</span>
<span class="ruby-value">59</span> <span class="ruby-identifier">days</span>, <span class="ruby-value">23</span> <span class="ruby-identifier">hrs</span>, <span class="ruby-value">59</span> <span class="ruby-identifier">mins</span>, <span class="ruby-value">30</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-identifier">yr</span> <span class="ruby-identifier">minus</span> <span class="ruby-value">1</span> <span class="ruby-identifier">sec</span>                    <span class="ruby-comment"># =&gt; [2..12] months</span>
<span class="ruby-value">1</span> <span class="ruby-identifier">yr</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-identifier">yr</span>, <span class="ruby-value">3</span> <span class="ruby-identifier">months</span>                                                   <span class="ruby-comment"># =&gt; about 1 year</span>
<span class="ruby-value">1</span> <span class="ruby-identifier">yr</span>, <span class="ruby-value">3</span> <span class="ruby-identifier">months</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-identifier">yr</span>, <span class="ruby-value">9</span> <span class="ruby-identifier">months</span>                                         <span class="ruby-comment"># =&gt; over 1 year</span>
<span class="ruby-value">1</span> <span class="ruby-identifier">yr</span>, <span class="ruby-value">9</span> <span class="ruby-identifier">months</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">2</span> <span class="ruby-identifier">yr</span> <span class="ruby-identifier">minus</span> <span class="ruby-value">1</span> <span class="ruby-identifier">sec</span>                                       <span class="ruby-comment"># =&gt; almost 2 years</span>
<span class="ruby-value">2</span> <span class="ruby-identifier">yrs</span> <span class="ruby-operator">&lt;</span><span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max</span> <span class="ruby-identifier">time</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">date</span>                                                <span class="ruby-comment"># =&gt; (same rules as 1 yr)</span>
</pre>

<p>With <code>include_seconds</code> = true and the difference &lt; 1 minute
29 seconds:</p>

<pre class="ruby"><span class="ruby-value">0</span><span class="ruby-operator">-</span><span class="ruby-value">4</span>   <span class="ruby-identifier">secs</span>      <span class="ruby-comment"># =&gt; less than 5 seconds</span>
<span class="ruby-value">5</span><span class="ruby-operator">-</span><span class="ruby-value">9</span>   <span class="ruby-identifier">secs</span>      <span class="ruby-comment"># =&gt; less than 10 seconds</span>
<span class="ruby-value">10</span><span class="ruby-operator">-</span><span class="ruby-value">19</span> <span class="ruby-identifier">secs</span>      <span class="ruby-comment"># =&gt; less than 20 seconds</span>
<span class="ruby-value">20</span><span class="ruby-operator">-</span><span class="ruby-value">39</span> <span class="ruby-identifier">secs</span>      <span class="ruby-comment"># =&gt; half a minute</span>
<span class="ruby-value">40</span><span class="ruby-operator">-</span><span class="ruby-value">59</span> <span class="ruby-identifier">secs</span>      <span class="ruby-comment"># =&gt; less than a minute</span>
<span class="ruby-value">60</span><span class="ruby-operator">-</span><span class="ruby-value">89</span> <span class="ruby-identifier">secs</span>      <span class="ruby-comment"># =&gt; 1 minute</span>
</pre>

<h4 id="method-i-distance_of_time_in_words-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">from_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">50</span>.<span class="ruby-identifier">minutes</span>)        <span class="ruby-comment"># =&gt; about 1 hour</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-value">50</span>.<span class="ruby-identifier">minutes</span>.<span class="ruby-identifier">from_now</span>)           <span class="ruby-comment"># =&gt; about 1 hour</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">15</span>.<span class="ruby-identifier">seconds</span>)        <span class="ruby-comment"># =&gt; less than a minute</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">15</span>.<span class="ruby-identifier">seconds</span>, <span class="ruby-keyword">true</span>)  <span class="ruby-comment"># =&gt; less than 20 seconds</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-value">3</span>.<span class="ruby-identifier">years</span>.<span class="ruby-identifier">from_now</span>)              <span class="ruby-comment"># =&gt; about 3 years</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">60</span>.<span class="ruby-identifier">hours</span>)          <span class="ruby-comment"># =&gt; 3 days</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">45</span>.<span class="ruby-identifier">seconds</span>, <span class="ruby-keyword">true</span>)  <span class="ruby-comment"># =&gt; less than a minute</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">-</span> <span class="ruby-value">45</span>.<span class="ruby-identifier">seconds</span>, <span class="ruby-keyword">true</span>)  <span class="ruby-comment"># =&gt; less than a minute</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-value">76</span>.<span class="ruby-identifier">seconds</span>.<span class="ruby-identifier">from_now</span>)           <span class="ruby-comment"># =&gt; 1 minute</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>.<span class="ruby-identifier">year</span> <span class="ruby-operator">+</span> <span class="ruby-value">3</span>.<span class="ruby-identifier">days</span>)   <span class="ruby-comment"># =&gt; about 1 year</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">3</span>.<span class="ruby-identifier">years</span> <span class="ruby-operator">+</span> <span class="ruby-value">6</span>.<span class="ruby-identifier">months</span>) <span class="ruby-comment"># =&gt; over 3 years</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">from_time</span> <span class="ruby-operator">+</span> <span class="ruby-value">4</span>.<span class="ruby-identifier">years</span> <span class="ruby-operator">+</span> <span class="ruby-value">9</span>.<span class="ruby-identifier">days</span> <span class="ruby-operator">+</span> <span class="ruby-value">30</span>.<span class="ruby-identifier">minutes</span> <span class="ruby-operator">+</span> <span class="ruby-value">5</span>.<span class="ruby-identifier">seconds</span>) <span class="ruby-comment"># =&gt; about 4 years</span>

<span class="ruby-identifier">to_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">6</span>.<span class="ruby-identifier">years</span> <span class="ruby-operator">+</span> <span class="ruby-value">19</span>.<span class="ruby-identifier">days</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span>, <span class="ruby-keyword">true</span>)     <span class="ruby-comment"># =&gt; about 6 years</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">to_time</span>, <span class="ruby-identifier">from_time</span>, <span class="ruby-keyword">true</span>)     <span class="ruby-comment"># =&gt; about 6 years</span>
<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>, <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)           <span class="ruby-comment"># =&gt; less than a minute</span>
</pre>
          

          
          <div class="method-source-code" id="distance_of_time_in_words-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 67</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword">false</span>, <span class="ruby-identifier">options</span> = {})
  <span class="ruby-identifier">from_time</span> = <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:to_time</span>)
  <span class="ruby-identifier">to_time</span> = <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:to_time</span>)
  <span class="ruby-identifier">distance_in_minutes</span> = (((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>)<span class="ruby-operator">/</span><span class="ruby-value">60</span>).<span class="ruby-identifier">round</span>
  <span class="ruby-identifier">distance_in_seconds</span> = ((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>).<span class="ruby-identifier">round</span>

  <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">with_options</span> <span class="ruby-value">:locale</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:locale</span>], <span class="ruby-value">:scope</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:'datetime.distance_in_words'</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">locale</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">distance_in_minutes</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">1</span>
        <span class="ruby-keyword">return</span> <span class="ruby-identifier">distance_in_minutes</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span>
               <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span>(<span class="ruby-value">:less_than_x_minutes</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>) <span class="ruby-operator">:</span>
               <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span>(<span class="ruby-value">:x_minutes</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">distance_in_minutes</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">include_seconds</span>

        <span class="ruby-keyword">case</span> <span class="ruby-identifier">distance_in_seconds</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>   <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:less_than_x_seconds</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">5</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">5</span><span class="ruby-operator">..</span><span class="ruby-value">9</span>   <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:less_than_x_seconds</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">19</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:less_than_x_seconds</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">20</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">39</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:half_a_minute</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">40</span><span class="ruby-operator">..</span><span class="ruby-value">59</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:less_than_x_minutes</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
          <span class="ruby-keyword">else</span>             <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:x_minutes</span>,           <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
        <span class="ruby-keyword">end</span>

      <span class="ruby-keyword">when</span> <span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-value">44</span>           <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:x_minutes</span>,      <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">distance_in_minutes</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">45</span><span class="ruby-operator">..</span><span class="ruby-value">89</span>          <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:about_x_hours</span>,  <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">90</span><span class="ruby-operator">..</span><span class="ruby-value">1439</span>        <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:about_x_hours</span>,  <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">60.0</span>).<span class="ruby-identifier">round</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">1440</span><span class="ruby-operator">..</span><span class="ruby-value">2519</span>      <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:x_days</span>,         <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">2520</span><span class="ruby-operator">..</span><span class="ruby-value">43199</span>     <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:x_days</span>,         <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">1440.0</span>).<span class="ruby-identifier">round</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">43200</span><span class="ruby-operator">..</span><span class="ruby-value">86399</span>    <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:about_x_months</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
      <span class="ruby-keyword">when</span> <span class="ruby-value">86400</span><span class="ruby-operator">..</span><span class="ruby-value">525599</span>   <span class="ruby-keyword">then</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span> <span class="ruby-value">:x_months</span>,       <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">43200.0</span>).<span class="ruby-identifier">round</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">fyear</span> = <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">year</span>
        <span class="ruby-identifier">fyear</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">month</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">3</span>
        <span class="ruby-identifier">tyear</span> = <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">year</span>
        <span class="ruby-identifier">tyear</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">month</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">3</span>
        <span class="ruby-identifier">leap_years</span> = (<span class="ruby-identifier">fyear</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tyear</span>) <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">fyear</span><span class="ruby-operator">..</span><span class="ruby-identifier">tyear</span>).<span class="ruby-identifier">count</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">leap?</span>(<span class="ruby-identifier">x</span>)}
        <span class="ruby-identifier">minute_offset_for_leap_year</span> = <span class="ruby-identifier">leap_years</span> * <span class="ruby-value">1440</span>
        <span class="ruby-comment"># Discount the leap year days when calculating year distance.</span>
        <span class="ruby-comment"># e.g. if there are 20 leap year days between 2 dates having the same day</span>
        <span class="ruby-comment"># and month then the based on 365 days calculation</span>
        <span class="ruby-comment"># the distance in years will come out to over 80 years when in written</span>
        <span class="ruby-comment"># english it would read better as about 80 years.</span>
        <span class="ruby-identifier">minutes_with_offset</span>         = <span class="ruby-identifier">distance_in_minutes</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">minute_offset_for_leap_year</span>
        <span class="ruby-identifier">remainder</span>                   = (<span class="ruby-identifier">minutes_with_offset</span> <span class="ruby-operator">%</span> <span class="ruby-value">525600</span>)
        <span class="ruby-identifier">distance_in_years</span>           = (<span class="ruby-identifier">minutes_with_offset</span> <span class="ruby-operator">/</span> <span class="ruby-value">525600</span>)
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">remainder</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">131400</span>
          <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span>(<span class="ruby-value">:about_x_years</span>,  <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">distance_in_years</span>)
        <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">remainder</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">394200</span>
          <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span>(<span class="ruby-value">:over_x_years</span>,   <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">distance_in_years</span>)
        <span class="ruby-keyword">else</span>
          <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">t</span>(<span class="ruby-value">:almost_x_years</span>, <span class="ruby-value">:count</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">distance_in_years</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
        <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- distance_of_time_in_words-source -->
          
        </div>

        

        
      </div><!-- distance_of_time_in_words-method -->

    
      <div id="method-i-distance_of_time_in_words_to_now" class="method-detail method-alias">
        
        <div class="method-heading">
          <span class="method-name">distance_of_time_in_words_to_now</span><span
            class="method-args">(from_time, include_seconds = false)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          
          

          
        </div>

        

        
        <div class="aliases">
          Alias for: <a href="DateHelper.html#method-i-time_ago_in_words">time_ago_in_words</a>
        </div>
        
      </div><!-- distance_of_time_in_words_to_now-method -->

    
      <div id="method-i-select_date" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_date</span><span
            class="method-args">(date = Date.current, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a set of html select-tags (one for year, month, and day)
pre-selected with the <code>date</code>. It’s possible to explicitly set
the order of the tags using the <code>:order</code> option with an array of
symbols <code>:year</code>, <code>:month</code> and <code>:day</code> in
the desired order. If the array passed to the <code>:order</code> option
does not contain all the three symbols, all tags will be hidden.</p>

<p>If anything is passed in the html_options hash it will be applied to every
select tag in the set.</p>

<h4 id="method-i-select_date-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_date</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">6</span>.<span class="ruby-identifier">days</span>

<span class="ruby-comment"># Generates a date select that defaults to the date in my_date (six days after today).</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>)

<span class="ruby-comment"># Generates a date select that defaults to today (no specified date).</span>
<span class="ruby-identifier">select_date</span>()

<span class="ruby-comment"># Generates a date select that defaults to the date in my_date (six days after today)</span>
<span class="ruby-comment"># with the fields ordered year, month, day rather than month, day, year.</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">order</span> =<span class="ruby-operator">&gt;</span> [:<span class="ruby-identifier">year</span>, :<span class="ruby-identifier">month</span>, :<span class="ruby-identifier">day</span>])

<span class="ruby-comment"># Generates a date select that discards the type of the field and defaults to the date in</span>
<span class="ruby-comment"># my_date (six days after today).</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">discard_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a date select that defaults to the date in my_date,</span>
<span class="ruby-comment"># which has fields separated by '/'.</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">date_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/'</span>)

<span class="ruby-comment"># Generates a date select that defaults to the datetime in my_date (six days after today)</span>
<span class="ruby-comment"># prefixed with 'payday' rather than 'date'.</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">prefix</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'payday'</span>)

<span class="ruby-comment"># Generates a date select with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for generic prompts.</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose day'</span>, :<span class="ruby-identifier">month</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose month'</span>, :<span class="ruby-identifier">year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose year'</span>})
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">hour</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>}) <span class="ruby-comment"># generic prompt for hours</span>
<span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">my_date</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>) <span class="ruby-comment"># generic prompts for all</span>
</pre>
          

          
          <div class="method-source-code" id="select_date-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 381</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_date</span>(<span class="ruby-identifier">date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">current</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_date</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_date-source -->
          
        </div>

        

        
      </div><!-- select_date-method -->

    
      <div id="method-i-select_datetime" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_datetime</span><span
            class="method-args">(datetime = Time.current, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a set of html select-tags (one for year, month, day, hour, minute,
and second) pre-selected with the <code>datetime</code>. It’s also possible
to explicitly set the order of the tags using the <code>:order</code>
option with an array of symbols <code>:year</code>, <code>:month</code> and
<code>:day</code> in the desired order. If you do not supply a <a
href="../../Symbol.html">Symbol</a>, it will be appended onto the
<code>:order</code> passed in. You can also add
<code>:date_separator</code>, <code>:datetime_separator</code> and
<code>:time_separator</code> keys to the <code>options</code> to control
visual display of the elements.</p>

<p>If anything is passed in the html_options hash it will be applied to every
select tag in the set.</p>

<h4 id="method-i-select_datetime-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_date_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">4</span>.<span class="ruby-identifier">days</span>

<span class="ruby-comment"># Generates a datetime select that defaults to the datetime in my_date_time (four days after today).</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>)

<span class="ruby-comment"># Generates a datetime select that defaults to today (no specified datetime)</span>
<span class="ruby-identifier">select_datetime</span>()

<span class="ruby-comment"># Generates a datetime select that defaults to the datetime in my_date_time (four days after today)</span>
<span class="ruby-comment"># with the fields ordered year, month, day rather than month, day, year.</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">order</span> =<span class="ruby-operator">&gt;</span> [:<span class="ruby-identifier">year</span>, :<span class="ruby-identifier">month</span>, :<span class="ruby-identifier">day</span>])

<span class="ruby-comment"># Generates a datetime select that defaults to the datetime in my_date_time (four days after today)</span>
<span class="ruby-comment"># with a '/' between each date field.</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">date_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/'</span>)

<span class="ruby-comment"># Generates a datetime select that defaults to the datetime in my_date_time (four days after today)</span>
<span class="ruby-comment"># with a date fields separated by '/', time fields separated by '' and the date and time fields</span>
<span class="ruby-comment"># separated by a comma (',').</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">date_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/'</span>, :<span class="ruby-identifier">time_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">''</span>, :<span class="ruby-identifier">datetime_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">','</span>)

<span class="ruby-comment"># Generates a datetime select that discards the type of the field and defaults to the datetime in</span>
<span class="ruby-comment"># my_date_time (four days after today)</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">discard_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generate a datetime field with hours in the AM/PM format</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">ampm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a datetime select that defaults to the datetime in my_date_time (four days after today)</span>
<span class="ruby-comment"># prefixed with 'payday' rather than 'date'</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">prefix</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'payday'</span>)

<span class="ruby-comment"># Generates a datetime select with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for generic prompts.</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose day'</span>, :<span class="ruby-identifier">month</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose month'</span>, :<span class="ruby-identifier">year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose year'</span>})
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">hour</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>}) <span class="ruby-comment"># generic prompt for hours</span>
<span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">my_date_time</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>) <span class="ruby-comment"># generic prompts for all</span>
</pre>
          

          
          <div class="method-source-code" id="select_datetime-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 340</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_datetime</span>(<span class="ruby-identifier">datetime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">current</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_datetime</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_datetime-source -->
          
        </div>

        

        
      </div><!-- select_datetime-method -->

    
      <div id="method-i-select_day" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_day</span><span
            class="method-args">(date, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a select tag with options for each of the days 1 through 31 with
the current day selected. The <code>date</code> can also be substituted for
a day number. Override the field name using the <code>:field_name</code>
option, ‘day’ by default.</p>

<h4 id="method-i-select_day-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_date</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span>.<span class="ruby-identifier">days</span>

<span class="ruby-comment"># Generates a select field for days that defaults to the day for the date in my_date.</span>
<span class="ruby-identifier">select_day</span>(<span class="ruby-identifier">my_time</span>)

<span class="ruby-comment"># Generates a select field for days that defaults to the number given.</span>
<span class="ruby-identifier">select_day</span>(<span class="ruby-value">5</span>)

<span class="ruby-comment"># Generates a select field for days that defaults to the day for the date in my_date</span>
<span class="ruby-comment"># that is named 'due' rather than 'day'.</span>
<span class="ruby-identifier">select_day</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">field_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'due'</span>)

<span class="ruby-comment"># Generates a select field for days with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for a</span>
<span class="ruby-comment"># generic prompt.</span>
<span class="ruby-identifier">select_day</span>(<span class="ruby-value">5</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose day'</span>)
</pre>
          

          
          <div class="method-source-code" id="select_day-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 524</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_day</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_day</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_day-source -->
          
        </div>

        

        
      </div><!-- select_day-method -->

    
      <div id="method-i-select_hour" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_hour</span><span
            class="method-args">(datetime, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a select tag with options for each of the hours 0 through 23 with
the current hour selected. The <code>datetime</code> can be either a
<code>Time</code> or <code>DateTime</code> object or an integer. Override
the field name using the <code>:field_name</code> option, ‘hour’ by
default.</p>

<h4 id="method-i-select_hour-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">6</span>.<span class="ruby-identifier">hours</span>

<span class="ruby-comment"># Generates a select field for hours that defaults to the hour for the time in my_time.</span>
<span class="ruby-identifier">select_hour</span>(<span class="ruby-identifier">my_time</span>)

<span class="ruby-comment"># Generates a select field for hours that defaults to the number given.</span>
<span class="ruby-identifier">select_hour</span>(<span class="ruby-value">13</span>)

<span class="ruby-comment"># Generates a select field for hours that defaults to the hour for the time in my_time</span>
<span class="ruby-comment"># that is named 'stride' rather than 'hour'.</span>
<span class="ruby-identifier">select_hour</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">field_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'stride'</span>)

<span class="ruby-comment"># Generates a select field for hours with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for a</span>
<span class="ruby-comment"># generic prompt.</span>
<span class="ruby-identifier">select_hour</span>(<span class="ruby-value">13</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose hour'</span>)

<span class="ruby-comment"># Generate a select field for hours in the AM/PM format</span>
<span class="ruby-identifier">select_hour</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">ampm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)
</pre>
          

          
          <div class="method-source-code" id="select_hour-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 499</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_hour</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_hour</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_hour-source -->
          
        </div>

        

        
      </div><!-- select_hour-method -->

    
      <div id="method-i-select_minute" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_minute</span><span
            class="method-args">(datetime, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a select tag with options for each of the minutes 0 through 59 with
the current minute selected. Also can return a select tag with options by
<code>minute_step</code> from 0 through 59 with the 00 minute selected. The
<code>datetime</code> can be either a <code>Time</code> or
<code>DateTime</code> object or an integer. Override the field name using
the <code>:field_name</code> option, ‘minute’ by default.</p>

<h4 id="method-i-select_minute-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">6</span>.<span class="ruby-identifier">hours</span>

<span class="ruby-comment"># Generates a select field for minutes that defaults to the minutes for the time in my_time.</span>
<span class="ruby-identifier">select_minute</span>(<span class="ruby-identifier">my_time</span>)

<span class="ruby-comment"># Generates a select field for minutes that defaults to the number given.</span>
<span class="ruby-identifier">select_minute</span>(<span class="ruby-value">14</span>)

<span class="ruby-comment"># Generates a select field for minutes that defaults to the minutes for the time in my_time</span>
<span class="ruby-comment"># that is named 'moment' rather than 'minute'.</span>
<span class="ruby-identifier">select_minute</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">field_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'moment'</span>)

<span class="ruby-comment"># Generates a select field for minutes with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for a</span>
<span class="ruby-comment"># generic prompt.</span>
<span class="ruby-identifier">select_minute</span>(<span class="ruby-value">14</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose minutes'</span>)
</pre>
          

          
          <div class="method-source-code" id="select_minute-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 471</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_minute</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_minute</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_minute-source -->
          
        </div>

        

        
      </div><!-- select_minute-method -->

    
      <div id="method-i-select_month" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_month</span><span
            class="method-args">(date, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a select tag with options for each of the months January through
December with the current month selected. The month names are presented as
keys (what’s shown to the user) and the month numbers (1-12) are used as
values (what’s submitted to the server). It’s also possible to use month
numbers for the presentation instead of names – set the
<code>:use_month_numbers</code> key in <code>options</code> to true for
this to happen. If you want both numbers and names, set the
<code>:add_month_numbers</code> key in <code>options</code> to true. If you
would prefer to show month names as abbreviations, set the
<code>:use_short_month</code> key in <code>options</code> to true. If you
want to use your own month names, set the <code>:use_month_names</code> key
in <code>options</code> to an array of 12 month names. Override the field
name using the <code>:field_name</code> option, ‘month’ by default.</p>

<h4 id="method-i-select_month-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-comment"># Generates a select field for months that defaults to the current month that</span>
<span class="ruby-comment"># will use keys like &quot;January&quot;, &quot;March&quot;.</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>)

<span class="ruby-comment"># Generates a select field for months that defaults to the current month that</span>
<span class="ruby-comment"># is named &quot;start&quot; rather than &quot;month&quot;.</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">field_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'start'</span>)

<span class="ruby-comment"># Generates a select field for months that defaults to the current month that</span>
<span class="ruby-comment"># will use keys like &quot;1&quot;, &quot;3&quot;.</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">use_month_numbers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a select field for months that defaults to the current month that</span>
<span class="ruby-comment"># will use keys like &quot;1 - January&quot;, &quot;3 - March&quot;.</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">add_month_numbers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a select field for months that defaults to the current month that</span>
<span class="ruby-comment"># will use keys like &quot;Jan&quot;, &quot;Mar&quot;.</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">use_short_month</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a select field for months that defaults to the current month that</span>
<span class="ruby-comment"># will use keys like &quot;Januar&quot;, &quot;Marts.&quot;</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">use_month_names</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">%w(Januar Februar Marts ...)</span>)

<span class="ruby-comment"># Generates a select field for months with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for a</span>
<span class="ruby-comment"># generic prompt.</span>
<span class="ruby-identifier">select_month</span>(<span class="ruby-value">14</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose month'</span>)
</pre>
          

          
          <div class="method-source-code" id="select_month-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 566</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_month</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_month</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_month-source -->
          
        </div>

        

        
      </div><!-- select_month-method -->

    
      <div id="method-i-select_second" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_second</span><span
            class="method-args">(datetime, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a select tag with options for each of the seconds 0 through 59 with
the current second selected. The <code>datetime</code> can be either a
<code>Time</code> or <code>DateTime</code> object or an integer. Override
the field name using the <code>:field_name</code> option, ‘second’ by
default.</p>

<h4 id="method-i-select_second-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">16</span>.<span class="ruby-identifier">minutes</span>

<span class="ruby-comment"># Generates a select field for seconds that defaults to the seconds for the time in my_time.</span>
<span class="ruby-identifier">select_second</span>(<span class="ruby-identifier">my_time</span>)

<span class="ruby-comment"># Generates a select field for seconds that defaults to the number given.</span>
<span class="ruby-identifier">select_second</span>(<span class="ruby-value">33</span>)

<span class="ruby-comment"># Generates a select field for seconds that defaults to the seconds for the time in my_time</span>
<span class="ruby-comment"># that is named 'interval' rather than 'second'.</span>
<span class="ruby-identifier">select_second</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">field_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'interval'</span>)

<span class="ruby-comment"># Generates a select field for seconds with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for a</span>
<span class="ruby-comment"># generic prompt.</span>
<span class="ruby-identifier">select_second</span>(<span class="ruby-value">14</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose seconds'</span>)
</pre>
          

          
          <div class="method-source-code" id="select_second-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 445</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_second</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_second</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_second-source -->
          
        </div>

        

        
      </div><!-- select_second-method -->

    
      <div id="method-i-select_time" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_time</span><span
            class="method-args">(datetime = Time.current, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a set of html select-tags (one for hour and minute). You can set
<code>:time_separator</code> key to format the output, and the
<code>:include_seconds</code> option to include an input for seconds.</p>

<p>If anything is passed in the html_options hash it will be applied to every
select tag in the set.</p>

<h4 id="method-i-select_time-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">my_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-value">5</span>.<span class="ruby-identifier">days</span> <span class="ruby-operator">+</span> <span class="ruby-value">7</span>.<span class="ruby-identifier">hours</span> <span class="ruby-operator">+</span> <span class="ruby-value">3</span>.<span class="ruby-identifier">minutes</span> <span class="ruby-operator">+</span> <span class="ruby-value">14</span>.<span class="ruby-identifier">seconds</span>

<span class="ruby-comment"># Generates a time select that defaults to the time in my_time.</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>)

<span class="ruby-comment"># Generates a time select that defaults to the current time (no specified time).</span>
<span class="ruby-identifier">select_time</span>()

<span class="ruby-comment"># Generates a time select that defaults to the time in my_time,</span>
<span class="ruby-comment"># which has fields separated by ':'.</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">time_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">':'</span>)

<span class="ruby-comment"># Generates a time select that defaults to the time in my_time,</span>
<span class="ruby-comment"># that also includes an input for seconds.</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">include_seconds</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a time select that defaults to the time in my_time, that has fields</span>
<span class="ruby-comment"># separated by ':' and includes an input for seconds.</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">time_separator</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">':'</span>, :<span class="ruby-identifier">include_seconds</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generate a time select field with hours in the AM/PM format</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">ampm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># Generates a time select with a custom prompt. Use &lt;tt&gt;:prompt&lt;/tt&gt; to true for generic prompts.</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">day</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose day'</span>, :<span class="ruby-identifier">month</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose month'</span>, :<span class="ruby-identifier">year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose year'</span>})
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">hour</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>}) <span class="ruby-comment"># generic prompt for hours</span>
<span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">my_time</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>) <span class="ruby-comment"># generic prompts for all</span>
</pre>
          

          
          <div class="method-source-code" id="select_time-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 420</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_time</span>(<span class="ruby-identifier">datetime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">current</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_time</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_time-source -->
          
        </div>

        

        
      </div><!-- select_time-method -->

    
      <div id="method-i-select_year" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">select_year</span><span
            class="method-args">(date, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a select tag with options for each of the five years on each side
of the current, which is selected. The five year radius can be changed
using the <code>:start_year</code> and <code>:end_year</code> keys in the
<code>options</code>. Both ascending and descending year lists are
supported by making <code>:start_year</code> less than or greater than
<code>:end_year</code>. The <code>date</code> can also be substituted for a
year given as a number. Override the field name using the
<code>:field_name</code> option, ‘year’ by default.</p>

<h4 id="method-i-select_year-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-comment"># Generates a select field for years that defaults to the current year that</span>
<span class="ruby-comment"># has ascending year values.</span>
<span class="ruby-identifier">select_year</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">start_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1992</span>, :<span class="ruby-identifier">end_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2007</span>)

<span class="ruby-comment"># Generates a select field for years that defaults to the current year that</span>
<span class="ruby-comment"># is named 'birth' rather than 'year'.</span>
<span class="ruby-identifier">select_year</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">field_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'birth'</span>)

<span class="ruby-comment"># Generates a select field for years that defaults to the current year that</span>
<span class="ruby-comment"># has descending year values.</span>
<span class="ruby-identifier">select_year</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>, :<span class="ruby-identifier">start_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2005</span>, :<span class="ruby-identifier">end_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1900</span>)

<span class="ruby-comment"># Generates a select field for years that defaults to the year 2006 that</span>
<span class="ruby-comment"># has ascending year values.</span>
<span class="ruby-identifier">select_year</span>(<span class="ruby-value">2006</span>, :<span class="ruby-identifier">start_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2000</span>, :<span class="ruby-identifier">end_year</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2010</span>)

<span class="ruby-comment"># Generates a select field for years with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for a</span>
<span class="ruby-comment"># generic prompt.</span>
<span class="ruby-identifier">select_year</span>(<span class="ruby-value">14</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose year'</span>)
</pre>
          

          
          <div class="method-source-code" id="select_year-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 597</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select_year</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">DateTimeSelector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>).<span class="ruby-identifier">select_year</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- select_year-source -->
          
        </div>

        

        
      </div><!-- select_year-method -->

    
      <div id="method-i-time_ago_in_words" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">time_ago_in_words</span><span
            class="method-args">(from_time, include_seconds = false)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Like <code>distance_of_time_in_words</code>, but where <code>to_time</code>
is fixed to <code>Time.now</code>.</p>

<h4 id="method-i-time_ago_in_words-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-value">3</span>.<span class="ruby-identifier">minutes</span>.<span class="ruby-identifier">from_now</span>)       <span class="ruby-comment"># =&gt; 3 minutes</span>
<span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-value">15</span>.<span class="ruby-identifier">hours</span>)      <span class="ruby-comment"># =&gt; about 15 hours</span>
<span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)                 <span class="ruby-comment"># =&gt; less than a minute</span>

<span class="ruby-identifier">from_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-value">3</span>.<span class="ruby-identifier">days</span> <span class="ruby-operator">-</span> <span class="ruby-value">14</span>.<span class="ruby-identifier">minutes</span> <span class="ruby-operator">-</span> <span class="ruby-value">25</span>.<span class="ruby-identifier">seconds</span>
<span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-identifier">from_time</span>)      <span class="ruby-comment"># =&gt; 3 days</span>
</pre>
          

          
          <div class="method-source-code" id="time_ago_in_words-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 132</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>, <span class="ruby-identifier">include_seconds</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- time_ago_in_words-source -->
          
        </div>

        
        <div class="aliases">
          Also aliased as: <a href="DateHelper.html#method-i-distance_of_time_in_words_to_now">distance_of_time_in_words_to_now</a>
        </div>
        

        
      </div><!-- time_ago_in_words-method -->

    
      <div id="method-i-time_select" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">time_select</span><span
            class="method-args">(object_name, method, options = {}, html_options = {})</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a set of select tags (one for hour, minute and optionally second)
pre-selected for accessing a specified time-based attribute (identified by
<code>method</code>) on an object assigned to the template (identified by
<code>object</code>). You can include the seconds with
<code>:include_seconds</code>. You can get hours in the AM/PM format with
<code>:ampm</code> option.</p>

<p>This method will also generate 3 input hidden tags, for the actual year,
month and day unless the option <code>:ignore_date</code> is set to
<code>true</code>. If you set the <code>:ignore_date</code> to
<code>true</code>, you must have a <code>date_select</code> on the same
method within the form otherwise an exception will be raised.</p>

<p>If anything is passed in the html_options hash it will be applied to every
select tag in the set.</p>

<h4 id="method-i-time_select-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-comment"># Creates a time select tag that, when POSTed, will be stored in the article variable in the sunrise attribute.</span>
<span class="ruby-identifier">time_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;sunrise&quot;</span>)

<span class="ruby-comment"># Creates a time select tag with a seconds field that, when POSTed, will be stored in the article variables in</span>
<span class="ruby-comment"># the sunrise attribute.</span>
<span class="ruby-identifier">time_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;start_time&quot;</span>, :<span class="ruby-identifier">include_seconds</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)

<span class="ruby-comment"># You can set the &lt;tt&gt;:minute_step&lt;/tt&gt; to 15 which will give you: 00, 15, 30 and 45.</span>
<span class="ruby-identifier">time_select</span> <span class="ruby-string">'game'</span>, <span class="ruby-string">'game_time'</span>, {:<span class="ruby-identifier">minute_step</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">15</span>}

<span class="ruby-comment"># Creates a time select tag with a custom prompt. Use &lt;tt&gt;:prompt =&gt; true&lt;/tt&gt; for generic prompts.</span>
<span class="ruby-identifier">time_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">hour</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose hour'</span>, :<span class="ruby-identifier">minute</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose minute'</span>, :<span class="ruby-identifier">second</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Choose seconds'</span>})
<span class="ruby-identifier">time_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">hour</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>}) <span class="ruby-comment"># generic prompt for hours</span>
<span class="ruby-identifier">time_select</span>(<span class="ruby-string">&quot;article&quot;</span>, <span class="ruby-string">&quot;written_on&quot;</span>, :<span class="ruby-identifier">prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>) <span class="ruby-comment"># generic prompts for all</span>

<span class="ruby-comment"># You can set :ampm option to true which will show the hours as: 12 PM, 01 AM .. 11 PM.</span>
<span class="ruby-identifier">time_select</span> <span class="ruby-string">'game'</span>, <span class="ruby-string">'game_time'</span>, {:<span class="ruby-identifier">ampm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>}
</pre>

<p>The selects are prepared for multi-parameter assignment to an Active Record
object.</p>

<p>Note: If the day is not included as an option but the month is, the day
will be set to the 1st to ensure that all month choices are valid.</p>
          

          
          <div class="method-source-code" id="time_select-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 253</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">time_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
  <span class="ruby-constant">InstanceTag</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-keyword">self</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:object</span>)).<span class="ruby-identifier">to_time_select_tag</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- time_select-source -->
          
        </div>

        

        
      </div><!-- time_select-method -->

    
      <div id="method-i-time_tag" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">time_tag</span><span
            class="method-args">(date_or_time, *args)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns an html time tag for the given date or time.</p>

<h4 id="method-i-time_tag-label-Examples">Examples</h4>

<pre class="ruby"><span class="ruby-identifier">time_tag</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>  <span class="ruby-comment"># =&gt;</span>
  <span class="ruby-operator">&lt;</span><span class="ruby-identifier">time</span> <span class="ruby-identifier">datetime</span>=<span class="ruby-string">&quot;2010-11-04&quot;</span><span class="ruby-operator">&gt;</span><span class="ruby-constant">November</span> <span class="ruby-value">04</span>, <span class="ruby-value">2010</span><span class="ruby-operator">&lt;</span><span class="ruby-node">%rtime&gt;
time_tag Time.now  # =&gt;
  &lt;time datetime=&quot;2010-11-04T17:55:45+01:00&quot;&gt;November 04, 2010 17:55&lt;/</span><span class="ruby-identifier">time</span><span class="ruby-operator">&gt;</span>
<span class="ruby-identifier">time_tag</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">yesterday</span>, <span class="ruby-string">'Yesterday'</span>  <span class="ruby-comment"># =&gt;</span>
  <span class="ruby-operator">&lt;</span><span class="ruby-identifier">time</span> <span class="ruby-identifier">datetime</span>=<span class="ruby-string">&quot;2010-11-03&quot;</span><span class="ruby-operator">&gt;</span><span class="ruby-constant">Yesterday</span><span class="ruby-operator">&lt;</span><span class="ruby-node">%rtime&gt;
time_tag Date.today, :pubdate =&gt; true  # =&gt;
  &lt;time datetime=&quot;2010-11-04&quot; pubdate=&quot;pubdate&quot;&gt;November 04, 2010&lt;/</span><span class="ruby-identifier">time</span><span class="ruby-operator">&gt;</span>
</pre>
          

          
          <div class="method-source-code" id="time_tag-source">
            <pre><span class="ruby-comment"># File /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_view/helpers/date_helper.rb, line 613</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">time_tag</span>(<span class="ruby-identifier">date_or_time</span>, *<span class="ruby-identifier">args</span>)
  <span class="ruby-identifier">options</span>  = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">extract_options!</span>
  <span class="ruby-identifier">format</span>   = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:format</span>) <span class="ruby-operator">||</span> <span class="ruby-value">:long</span>
  <span class="ruby-identifier">content</span>  = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">||</span> <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">l</span>(<span class="ruby-identifier">date_or_time</span>, <span class="ruby-value">:format</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">format</span>)
  <span class="ruby-identifier">datetime</span> = <span class="ruby-identifier">date_or_time</span>.<span class="ruby-identifier">acts_like?</span>(<span class="ruby-value">:time</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date_or_time</span>.<span class="ruby-identifier">xmlschema</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date_or_time</span>.<span class="ruby-identifier">rfc3339</span>

  <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:time</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge</span>(<span class="ruby-value">:datetime</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">datetime</span>))
<span class="ruby-keyword">end</span></pre>
          </div><!-- time_tag-source -->
          
        </div>

        

        
      </div><!-- time_tag-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- 5Buntitled-5D -->

</div><!-- documentation -->


<footer id="validator-badges">
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
  <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>

